|
@@ -527,8 +527,6 @@ int do_sockets(int next)
|
|
struct timeval timeout;
|
|
struct timeval timeout;
|
|
int ret,i;
|
|
int ret,i;
|
|
|
|
|
|
- last_tick = time(0);
|
|
|
|
-
|
|
|
|
// PRESEND Timers are executed before do_sendrecv and can send packets and/or set sessions to eof.
|
|
// PRESEND Timers are executed before do_sendrecv and can send packets and/or set sessions to eof.
|
|
// Send remaining data and process client-side disconnects here.
|
|
// Send remaining data and process client-side disconnects here.
|
|
#ifdef SEND_SHORTLIST
|
|
#ifdef SEND_SHORTLIST
|
|
@@ -561,6 +559,8 @@ int do_sockets(int next)
|
|
return 0; // interrupted by a signal, just loop and try again
|
|
return 0; // interrupted by a signal, just loop and try again
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ last_tick = time(NULL);
|
|
|
|
+
|
|
#ifdef WIN32
|
|
#ifdef WIN32
|
|
// on windows, enumerating all members of the fd_set is way faster if we access the internals
|
|
// on windows, enumerating all members of the fd_set is way faster if we access the internals
|
|
for(i=0;i<(int)rfd.fd_count;i++)
|
|
for(i=0;i<(int)rfd.fd_count;i++)
|
|
@@ -1080,7 +1080,7 @@ void socket_init(void)
|
|
socket_config_read(SOCKET_CONF_FILENAME);
|
|
socket_config_read(SOCKET_CONF_FILENAME);
|
|
|
|
|
|
// initialise last send-receive tick
|
|
// initialise last send-receive tick
|
|
- last_tick = time(0);
|
|
|
|
|
|
+ last_tick = time(NULL);
|
|
|
|
|
|
// session[0] is now currently used for disconnected sessions of the map server, and as such,
|
|
// session[0] is now currently used for disconnected sessions of the map server, and as such,
|
|
// should hold enough buffer (it is a vacuum so to speak) as it is never flushed. [Skotlex]
|
|
// should hold enough buffer (it is a vacuum so to speak) as it is never flushed. [Skotlex]
|