Browse Source

Update tunnel.c

pull/1989/head
Roy Anderson 6 years ago
committed by GitHub
parent
commit
dc82071536
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. 4
      src/tunnel.c

4
src/tunnel.c

@ -156,9 +156,9 @@ create_and_bind(const char *addr, const char *port)
int opt = 1;
if (fast_open == 1){
setsockopt(listen_sock, SOL_SOCKET, SO_REUSEADDR, TCP_FASTOPEN, &opt, sizeof(opt));
setsockopt(listen_sock, SOL_TCP, TCP_FASTOPEN, &opt, sizeof(opt));
#ifdef SO_NOSIGPIPE
setsockopt(listen_sock, SOL_SOCKET, SO_NOSIGPIPE, TCP_FASTOPEN, &opt, sizeof(opt));
setsockopt(listen_sock, SOL_TCP, TCP_FASTOPEN, &opt, sizeof(opt));
#endif
}
else {

Loading…
Cancel
Save