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

This commit is contained in:
刘祥超
2021-10-30 22:35:05 +08:00
parent ced82d8a30
commit b679fc3b25

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)
}
}