mirror of
https://github.com/yuanyuanxiang/SimpleRemoter.git
synced 2026-01-30 03:03:12 +08:00
Fix: #293 Wrong keep-alive time set for IOCPServer
This commit is contained in:
@@ -700,7 +700,7 @@ void IOCPServer::OnAccept()
|
||||
//设置套接字的选项卡 Set KeepAlive 开启保活机制 SO_KEEPALIVE
|
||||
//保持连接检测对方主机是否崩溃如果2小时内在此套接口的任一方向都没
|
||||
//有数据交换,TCP就自动给对方 发一个保持存活
|
||||
m_ulKeepLiveTime = 3;
|
||||
m_ulKeepLiveTime = 1000 * 60 * 3;
|
||||
const BOOL bKeepAlive = TRUE;
|
||||
setsockopt(ContextObject->sClientSocket,SOL_SOCKET,SO_KEEPALIVE,(char*)&bKeepAlive,sizeof(bKeepAlive));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user