1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

Enabled 'keepalive' option to detect dead connections

This commit is contained in:
Ivan Savenko 2024-04-16 16:31:01 +03:00
parent ff1aa4407c
commit 526ac9807b

View File

@ -17,6 +17,7 @@ NetworkConnection::NetworkConnection(INetworkConnectionListener & listener, cons
, listener(listener)
{
socket->set_option(boost::asio::ip::tcp::no_delay(true));
socket->set_option(boost::asio::socket_base::keep_alive(true));
// iOS throws exception on attempt to set buffer size
constexpr auto bufferSize = 4 * 1024 * 1024;