fixed bug for websocket close tip message

This commit is contained in:
RockYang
2024-04-15 18:15:15 +08:00
parent 3a8a69ac2e
commit cd562ab8ed
6 changed files with 3 additions and 65 deletions

View File

@@ -78,10 +78,6 @@ func (h *MidJourneyHandler) Client(c *gin.Context) {
}
client := types.NewWsClient(ws)
// close the existed connections
if cli := h.pool.Clients.Get(uint(userId)); cli != nil {
cli.Close()
}
h.pool.Clients.Put(uint(userId), client)
logger.Infof("New websocket connected, IP: %s", c.RemoteIP())
}