summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands.cpp6
-rw-r--r--src/connection.cpp2
-rw-r--r--src/inspircd_io.cpp4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/commands.cpp b/src/commands.cpp
index 3a30a3972..547d47536 100644
--- a/src/commands.cpp
+++ b/src/commands.cpp
@@ -336,16 +336,16 @@ void handle_restart(char **parameters, int pcnt, userrec *user)
sleep(1);
for (int i = 0; i < 65536; i++)
{
- int on = 0;
+ int on = 1;
struct linger linger = { 0 };
setsockopt(i, SOL_SOCKET, SO_REUSEADDR, (const char*)&on, sizeof(on));
linger.l_onoff = 1;
- linger.l_linger = 0;
+ linger.l_linger = 1;
setsockopt(i, SOL_SOCKET, SO_LINGER, (const char*)&linger,sizeof(linger));
Blocking(i);
close(i);
}
- sleep(5);
+ sleep(2);
execv(MyExecutable,argv);
diff --git a/src/connection.cpp b/src/connection.cpp
index 4226a9d2f..b197caef1 100644
--- a/src/connection.cpp
+++ b/src/connection.cpp
@@ -61,7 +61,7 @@ bool connection::CreateListener(char* host, int p)
setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,(const char*)&on,sizeof(on));
linger.l_onoff = 1;
- linger.l_linger = 0;
+ linger.l_linger = 1;
setsockopt(fd,SOL_SOCKET,SO_LINGER,(const char*)&linger,sizeof(linger));
// attempt to increase socket sendq and recvq as high as its possible
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);
}