mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
set time out
This commit is contained in:
committed by
Xinwei Xiong(cubxxw-openim)
parent
7e517b9ab9
commit
9bacd07973
@@ -97,7 +97,7 @@ func (ws *WServer) SetWriteTimeout(conn *UserConn, timeout int) {
|
||||
func (ws *WServer) writeMsg(conn *UserConn, a int, msg []byte) error {
|
||||
conn.w.Lock()
|
||||
defer conn.w.Unlock()
|
||||
conn.SetWriteDeadline(time.Now().Add(time.Duration(30) * time.Second))
|
||||
conn.SetWriteDeadline(time.Now().Add(time.Duration(10) * time.Second))
|
||||
return conn.WriteMessage(a, msg)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user