mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Simple workaround to fix vcmiserver shutdown procedure
At the moment, vcmilobby *requires* async writes in order to handle multiple connections with different speeds and at optimal performance, without hanging if one player is too slow and can't eat all data server sent to him at once. However server (and potentially - client) can not handle this mode and may shutdown either socket or entire asio service too early, before all writes are performed, leading to weird freeze on ending scenario where client would not receive notifications about end of game.
This commit is contained in:
@@ -17,6 +17,7 @@ class DLL_LINKAGE INetworkConnection : boost::noncopyable
|
||||
public:
|
||||
virtual ~INetworkConnection() = default;
|
||||
virtual void sendPacket(const std::vector<std::byte> & message) = 0;
|
||||
virtual void setAsyncWritesEnabled(bool on) = 0;
|
||||
virtual void close() = 0;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user