Skip to content

Commit

Permalink
Update file count (IceWhaleTech#965)
Browse files Browse the repository at this point in the history
  • Loading branch information
LinkLeong authored Mar 20, 2023
1 parent a0dc582 commit 5c2c3b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions route/v1/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,7 @@ func init() {
func (c *Client) writePump() {
defer func() {
c.handler.unregister <- c

c.conn.Close()
}()
for {
Expand All @@ -1011,6 +1012,7 @@ func (c *Client) readPump() {
if websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway, websocket.CloseAbnormalClosure) {
log.Printf("error: %v", err)
}
c.handler.broadcast <- []byte(`{"type":"peer-left","peerId":"` + c.ID + `"}`)
break
}
// 要的话,推给广播中心,广播中心再推给每个用户
Expand Down

0 comments on commit 5c2c3b5

Please sign in to comment.