Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,9 @@ namespace stream {
break;
case ENET_EVENT_TYPE_CONNECT:
BOOST_LOG(info) << "CLIENT CONNECTED"sv;
// Without this the peer keeps ENet's default timeout (5 s minimum), so a short network outage
// drops the client even though the session itself tolerates ping_timeout.
enet_peer_timeout(event.peer, 0, (enet_uint32) config::stream.ping_timeout.count(), (enet_uint32) config::stream.ping_timeout.count());
break;
case ENET_EVENT_TYPE_DISCONNECT:
BOOST_LOG(info) << "CLIENT DISCONNECTED"sv;
Expand Down