Merge pull request #20548 from gustavotrott/avoid-middleware-msg
refactor (gql-middleware): Avoid sending msg GraphqlConnectionClosed when unnecessary
This commit is contained in:
commit
c49603ff38
@ -81,7 +81,10 @@ func ConnectionHandler(w http.ResponseWriter, r *http.Request) {
|
||||
if bcExists {
|
||||
sessionTokenRemoved := BrowserConnections[browserConnectionId].SessionToken
|
||||
delete(BrowserConnections, browserConnectionId)
|
||||
go SendUserGraphqlConnectionClosedSysMsg(sessionTokenRemoved, browserConnectionId)
|
||||
|
||||
if sessionTokenRemoved != "" {
|
||||
go SendUserGraphqlConnectionClosedSysMsg(sessionTokenRemoved, browserConnectionId)
|
||||
}
|
||||
}
|
||||
BrowserConnectionsMutex.Unlock()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user