Skip to content

Commit f00cfcd

Browse files
committed
fix compiler complaints on platforms without TCP_NODELAY
1 parent 5745559 commit f00cfcd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/main/listen.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1384,7 +1384,6 @@ static int dual_tcp_accept(rad_listen_t *listener)
13841384
if (fr_nonblock(this->fd) < 0) {
13851385
ERROR("Failed setting non-blocking on socket: %s",
13861386
fr_syserror(errno));
1387-
error:
13881387
close(this->fd);
13891388
return 0; /* do NOT close the parent socket! */
13901389
}
@@ -1399,7 +1398,8 @@ static int dual_tcp_accept(rad_listen_t *listener)
13991398

14001399
if (setsockopt(this->fd, SOL_TCP, TCP_NODELAY, &on, sizeof(on)) < 0) {
14011400
ERROR("(TLS) Failed to set TCP_NODELAY: %s", fr_syserror(errno));
1402-
goto error;
1401+
close(this->fd);
1402+
return 0; /* do NOT close the parent socket! */
14031403
}
14041404
}
14051405
#endif

0 commit comments

Comments
 (0)