This commit is contained in:
poiuty 2023-05-21 19:35:14 +03:00
parent e753c79416
commit 07075823b2

View file

@ -191,7 +191,7 @@ func xWorker(workerData Info, u url.URL) {
_, message, err := c.ReadMessage()
if err != nil {
fmt.Println(err.Error(), workerData.room)
if workerData.Income > 1 {
if workerData.Income > 1 && websocket.IsUnexpectedCloseError(err, websocket.CloseGoingAway) {
go reconnectRoom(workerData)
}
return