Fix: tapper status race condition (#788)

This commit is contained in:
Igor Gov
2022-02-10 12:13:40 +02:00
committed by GitHub
parent a4066da5d7
commit 88e3fba1ef
4 changed files with 29 additions and 17 deletions

View File

@@ -34,9 +34,12 @@ func (h *RoutesEventHandlers) WebSocketConnect(socketId int, isTapper bool) {
tappers.Connected()
} else {
logger.Log.Infof("Websocket event - Browser socket connected, socket ID: %d", socketId)
socketListLock.Lock()
browserClientSocketUUIDs = append(browserClientSocketUUIDs, socketId)
socketListLock.Unlock()
BroadcastTappedPodsStatus()
}
}