Skip to content

Commit

Permalink
cosmetic reorder
Browse files Browse the repository at this point in the history
  • Loading branch information
sawka committed Oct 18, 2024
1 parent 56397f2 commit 82e874b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions pkg/web/ws.go
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,11 @@ func HandleWsInternal(w http.ResponseWriter, r *http.Request) error {
} else {
routeId = wshutil.MakeWindowRouteId(windowId)
}
log.Printf("[websocket] new connection: windowid:%s connid:%s routeid:%s\n", windowId, wsConnId, routeId)
eventbus.RegisterWSChannel(wsConnId, windowId, outputCh)
defer eventbus.UnregisterWSChannel(wsConnId)

// we create a wshproxy to handle rpc messages to/from the window
wproxy := wshutil.MakeRpcProxy()
wproxy := wshutil.MakeRpcProxy() // we create a wshproxy to handle rpc messages to/from the window
defer close(wproxy.ToRemoteCh)
log.Printf("[websocket] new connection: windowid:%s connid:%s routeid:%s\n", windowId, wsConnId, routeId)
registerConn(wsConnId, routeId, wproxy)
defer unregisterConn(wsConnId, routeId)
wg := &sync.WaitGroup{}
Expand Down

0 comments on commit 82e874b

Please sign in to comment.