summaryrefslogtreecommitdiffstats
path: root/src/bind.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bind.c')
-rw-r--r--src/bind.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bind.c b/src/bind.c
index 03d34031..b929b5c4 100644
--- a/src/bind.c
+++ b/src/bind.c
@@ -254,7 +254,6 @@ int ssh_bind_listen(ssh_bind sshbind) {
sshbind->rsa = NULL;
return -1;
}
- sshbind->bindfd = fd;
if (listen(fd, 10) < 0) {
ssh_set_error(sshbind, SSH_FATAL,
@@ -267,6 +266,8 @@ int ssh_bind_listen(ssh_bind sshbind) {
sshbind->rsa = NULL;
return -1;
}
+
+ sshbind->bindfd = fd;
} else {
SSH_LOG(SSH_LOG_INFO, "Using app-provided bind socket");
}