(wsConnId string, stableId string)
| 237 | } |
| 238 | |
| 239 | func unregisterConn(wsConnId string, stableId string) { |
| 240 | GlobalLock.Lock() |
| 241 | defer GlobalLock.Unlock() |
| 242 | curConnInfo := RouteToConnMap[stableId] |
| 243 | if curConnInfo == nil || curConnInfo.ConnId != wsConnId { |
| 244 | log.Printf("[websocket] warning: trying to unregister connection %q for stableid %q but it is not the current connection (ignoring)\n", wsConnId, stableId) |
| 245 | return |
| 246 | } |
| 247 | delete(RouteToConnMap, stableId) |
| 248 | if curConnInfo.LinkId != baseds.NoLinkId { |
| 249 | wshutil.DefaultRouter.UnregisterLink(curConnInfo.LinkId) |
| 250 | } |
| 251 | } |
| 252 | |
| 253 | func HandleWsInternal(w http.ResponseWriter, r *http.Request) error { |
| 254 | stableId := r.URL.Query().Get("stableid") |
no test coverage detected