修复连接快速关闭时数据可能无法完整传输的问题

This commit is contained in:
GoEdgeLab
2021-10-30 22:35:05 +08:00
parent a3b5bbf4e7
commit e1ec799691

View File

@@ -53,7 +53,7 @@ func NewClientConn(conn net.Conn, quickClose bool) net.Conn {
tcpConn, ok := conn.(*net.TCPConn)
if ok {
// TODO 可以设置此值
_ = tcpConn.SetLinger(0)
_ = tcpConn.SetLinger(3)
}
}