mirror of
https://github.com/fiatjaf/khatru.git
synced 2026-04-04 04:34:24 +02:00
store websocket object under WS_KEY at the connection context.
This commit is contained in:
@@ -49,6 +49,8 @@ func (rl *Relay) HandleWebsocket(w http.ResponseWriter, r *http.Request) {
|
||||
WaitingForAuth: make(chan struct{}),
|
||||
}
|
||||
|
||||
ctx = context.WithValue(ctx, WS_KEY, ws)
|
||||
|
||||
// reader
|
||||
go func() {
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user