diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-16 15:19:50 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-16 15:19:50 +0000 |
commit | 99d1c8f0ab4a213a5087b6103ca07a8cb355c2c2 (patch) | |
tree | c08f29366976c80482d9fe4651ace8ea964bc16b /src/inspircd_io.cpp | |
parent | 3cd71f1ee59649a6202e07bae486e15f3b2267f8 (diff) |
Fixed lingering (SO_REUSEADDR was being set to 0?)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1111 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/inspircd_io.cpp')
-rw-r--r-- | src/inspircd_io.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/inspircd_io.cpp b/src/inspircd_io.cpp index 00842b697..6df9af3ef 100644 --- a/src/inspircd_io.cpp +++ b/src/inspircd_io.cpp @@ -667,7 +667,7 @@ int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server int OpenTCPSocket (void) { int sockfd; - int on = 0; + int on = 1; struct linger linger = { 0 }; if ((sockfd = socket (AF_INET, SOCK_STREAM, 0)) < 0) @@ -677,7 +677,7 @@ int OpenTCPSocket (void) setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on)); /* This is BSD compatible, setting l_onoff to 0 is *NOT* http://web.irc.org/mla/ircd-dev/msg02259.html */ linger.l_onoff = 1; - linger.l_linger = 0; + linger.l_linger = 1; setsockopt(sockfd, SOL_SOCKET, SO_LINGER, (const char*)&linger,sizeof(linger)); return (sockfd); } |