summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-04-11 02:27:20 +0300
committerAndrei Karas <akaras@inbox.ru>2019-05-05 22:22:04 +0300
commit1a58bb1f11156baff437b3029feafa0d793ed803 (patch)
tree9380eff810e25d1fd132049b9ca59a37eed07eab
parentefd93a0d67a1dc90c68aa7185c2cdea7f55aa66b (diff)
downloadhercules-1a58bb1f11156baff437b3029feafa0d793ed803.tar.gz
hercules-1a58bb1f11156baff437b3029feafa0d793ed803.tar.bz2
hercules-1a58bb1f11156baff437b3029feafa0d793ed803.tar.xz
hercules-1a58bb1f11156baff437b3029feafa0d793ed803.zip
Before correct client disconnect send disconnect packet and flush socket
-rw-r--r--src/map/clif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 11bd2218a..1e129792f 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -10742,8 +10742,9 @@ static void clif_parse_QuitGame(int fd, struct map_session_data *sd)
/* Rovert's prevent logout option fixed [Valaris] */
if (!sd->sc.data[SC_CLOAKING] && !sd->sc.data[SC_HIDING] && !sd->sc.data[SC_CHASEWALK] && !sd->sc.data[SC_CLOAKINGEXCEED] && !sd->sc.data[SC__INVISIBILITY] && !sd->sc.data[SC_SUHIDE] &&
(!battle_config.prevent_logout || DIFF_TICK(timer->gettick(), sd->canlog_tick) > battle_config.prevent_logout)) {
- sockt->eof(fd);
clif->disconnect_ack(sd, 0);
+ sockt->flush(fd);
+ sockt->eof(fd);
} else {
clif->disconnect_ack(sd, 1);
}