mirror of
https://github.com/IceWhaleTech/CasaOS.git
synced 2025-11-06 14:49:52 +00:00
Update file count (#965)
This commit is contained in:
parent
a0dc58264a
commit
5c2c3b5e98
@ -985,6 +985,7 @@ func init() {
|
|||||||
func (c *Client) writePump() {
|
func (c *Client) writePump() {
|
||||||
defer func() {
|
defer func() {
|
||||||
c.handler.unregister <- c
|
c.handler.unregister <- c
|
||||||
|
|
||||||
c.conn.Close()
|
c.conn.Close()
|
||||||
}()
|
}()
|
||||||
for {
|
for {
|
||||||
@ -1011,6 +1012,7 @@ func (c *Client) readPump() {
|
|||||||
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
|
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
|
||||||
log.Printf("error: %v", err)
|
log.Printf("error: %v", err)
|
||||||
}
|
}
|
||||||
|
c.handler.broadcast <- []byte(`{"type":"peer-left","peerId":"` + c.ID + `"}`)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// 要的话,推给广播中心,广播中心再推给每个用户
|
// 要的话,推给广播中心,广播中心再推给每个用户
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user