diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-12-28 18:02:14 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-12-28 18:02:14 +0000 |
commit | 9fc3ecf51324fd26aba173daf8c5409695747f79 (patch) | |
tree | 0d48ce8dae60d6b34f36a4ca9011e5406cdd72a6 /src | |
parent | 6cbe5719321c25c7bfe2c45cee23f3b295c835c2 (diff) | |
download | hercules-9fc3ecf51324fd26aba173daf8c5409695747f79.tar.gz hercules-9fc3ecf51324fd26aba173daf8c5409695747f79.tar.bz2 hercules-9fc3ecf51324fd26aba173daf8c5409695747f79.tar.xz hercules-9fc3ecf51324fd26aba173daf8c5409695747f79.zip |
- Added a func_parse invocation when an invalid socket is found, so that the underlying code (char/map/login) can handle it and free any related resources.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9587 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/common/socket.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/socket.c b/src/common/socket.c index c8fe7aa1c..0bcc979da 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -646,6 +646,10 @@ int do_sendrecv(int next) if(h_errno == EBADF) //See the #defines at the top { ShowError("Deleting invalid session %d\n", i); + //So the code can react accordingly + session[i]->eof = 1; + if(session[i]->func_parse) + session[i]->func_parse(i); free_session_mem(i); //free the bad session continue; } |