mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-25 07:45:01 +00:00
Fixed panic in socket cleanup (#1193)
This commit is contained in:
parent
9aaf3f1423
commit
5875ba0eb3
@ -97,7 +97,9 @@ func websocketHandler(c *gin.Context, eventHandlers EventHandlers, isTapper bool
|
|||||||
websocketIdsLock.Unlock()
|
websocketIdsLock.Unlock()
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
socketCleanup(socketId, connectedWebsockets[socketId])
|
if socketConnection := connectedWebsockets[socketId]; socketConnection != nil {
|
||||||
|
socketCleanup(socketId, socketConnection)
|
||||||
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
eventHandlers.WebSocketConnect(c, socketId, isTapper)
|
eventHandlers.WebSocketConnect(c, socketId, isTapper)
|
||||||
|
Loading…
Reference in New Issue
Block a user