summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-06-18 15:05:45 +0000
committerrubidium <rubidium@openttd.org>2009-06-18 15:05:45 +0000
commita497e3ff4a9e01db6e0ce97ba573cf53758a3994 (patch)
treeb6f4c3ef88214b376040496860ba7e5d040ad43b
parentcdc0c092f1c9c7ae7a7fb30676b320c536822d4f (diff)
downloadopenttd-a497e3ff4a9e01db6e0ce97ba573cf53758a3994.tar.xz
(svn r16592) -Fix [FS#2880]: 'connection lost' was also shown when the client was 'leaving'.
-rw-r--r--src/network/network_server.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index cd1fd0c1c..1ed4031ce 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -989,6 +989,12 @@ DEF_SERVER_RECEIVE_COMMAND(PACKET_CLIENT_QUIT)
}
}
+ /* First tell we already closed the connection...
+ * ... then start the generic code to close the actual connection.
+ * This to make sure the 'connection lost' message is only shown
+ * when the connection got really lost and not when the client
+ * told us it was going to disconnect. */
+ cs->NetworkSocketHandler::CloseConnection();
cs->CloseConnection();
}