mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
set time out
This commit is contained in:
parent
768d139789
commit
dca39d6eae
@ -98,7 +98,7 @@ func (ws *WServer) SetWriteTimeout(conn *UserConn, timeout int) {
|
|||||||
func (ws *WServer) writeMsg(conn *UserConn, a int, msg []byte) error {
|
func (ws *WServer) writeMsg(conn *UserConn, a int, msg []byte) error {
|
||||||
conn.w.Lock()
|
conn.w.Lock()
|
||||||
defer conn.w.Unlock()
|
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)
|
return conn.WriteMessage(a, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user