summaryrefslogtreecommitdiff
path: root/src/uanytun.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/uanytun.c')
-rw-r--r--src/uanytun.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/uanytun.c b/src/uanytun.c
index b867648..b95996f 100644
--- a/src/uanytun.c
+++ b/src/uanytun.c
@@ -219,7 +219,9 @@ int process_key_exchange(unixdomain_t* sock, fd_set* readyfds)
{
if(FD_ISSET(sock->server_fd_, readyfds)) {
int old_fd = sock->client_fd_;
- unixdomain_accept(sock);
+ if(unixdomain_accept(sock)) {
+ return -1;
+ }
if(old_fd != sock->client_fd_) {
log_printf(INFO, "key exchange: new client");
}