diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-08 16:36:48 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-02-08 16:36:48 +0000 |
commit | 4e8674860d894a1b1b9cbf6b7a7e19e7533ff29c (patch) | |
tree | c168183b6680bc10ca02a412f629bceabd7cd3cb /src/common/socket.c | |
parent | 84087a82d95c4b6810fed0b4f4f8312523367a93 (diff) | |
download | hercules-4e8674860d894a1b1b9cbf6b7a7e19e7533ff29c.tar.gz hercules-4e8674860d894a1b1b9cbf6b7a7e19e7533ff29c.tar.bz2 hercules-4e8674860d894a1b1b9cbf6b7a7e19e7533ff29c.tar.xz hercules-4e8674860d894a1b1b9cbf6b7a7e19e7533ff29c.zip |
- Fixed the new socket code, which was triggering the inactivity timeout on the servers' listening sockets
- Fixed the TURBO code not working since r4468 (parse func never called)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9826 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/common/socket.c')
-rw-r--r-- | src/common/socket.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index 2a6011a22..43422da85 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -133,7 +133,7 @@ void set_nonblocking(int fd, int yes) { // TCP_NODELAY BOOL Disables the Nagle algorithm for send coalescing. if(mode_neg) - setsockopt(fd, IPPROTO_TCP, TCP_NODELAY,(char *)&yes, sizeof yes); + setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&yes, sizeof yes); // FIONBIO Use with a nonzero argp parameter to enable the nonblocking mode of socket s. // The argp parameter is zero if nonblocking is to be disabled. @@ -291,6 +291,7 @@ int connect_client(int listen_fd) create_session(fd, recv_to_fifo, send_from_fifo, default_func_parse); session[fd]->client_addr = client_address; + session[fd]->rdata_tick = last_tick; return fd; } @@ -380,6 +381,7 @@ int make_connection(long ip, int port) FD_SET(fd,&readfds); create_session(fd, recv_to_fifo, send_from_fifo, default_func_parse); + session[fd]->rdata_tick = last_tick; return fd; } @@ -394,7 +396,6 @@ int create_session(int fd, RecvFunc func_recv, SendFunc func_send, ParseFunc fun session[fd]->func_recv = func_recv; session[fd]->func_send = func_send; session[fd]->func_parse = func_parse; - session[fd]->rdata_tick = last_tick; return 0; } |