From da6769f929be02a0b3b4d6c52b79922104cdd053 Mon Sep 17 00:00:00 2001 From: Ben Longbons Date: Mon, 23 Jun 2014 20:40:46 -0700 Subject: Use the generated char server protocol in the map server --- src/char/char.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/char') diff --git a/src/char/char.cpp b/src/char/char.cpp index 33ee2b9..7bc17ba 100644 --- a/src/char/char.cpp +++ b/src/char/char.cpp @@ -1188,13 +1188,7 @@ int char_delete(CharPair *cp) static void parse_tologin(Session *ls) { - // only login-server can have an access to here. - // so, if it isn't the login-server, we disconnect the session (fd != login_fd). - if (ls != login_session) - { - ls->set_eof(); - return; - } + assert (ls == login_session); char_session_data *sd = static_cast(ls->session_data.get()); @@ -1665,6 +1659,8 @@ void parse_tologin(Session *ls) } } } + if (rv == RecvResult::Error) + ls->set_eof(); } //-------------------------------- @@ -2281,6 +2277,8 @@ void parse_frommap(Session *ms) } } } + if (rv == RecvResult::Error) + ms->set_eof(); } static @@ -2770,6 +2768,8 @@ void parse_char(Session *s) return; } } + if (rv == RecvResult::Error) + s->set_eof(); } static -- cgit v1.2.3-70-g09d2