|
@@ -1,12 +1,12 @@
|
|
|
package httpservers
|
|
package httpservers
|
|
|
|
|
|
|
|
import (
|
|
import (
|
|
|
- "time"
|
|
|
|
|
|
|
+ "context"
|
|
|
log "github.com/sirupsen/logrus"
|
|
log "github.com/sirupsen/logrus"
|
|
|
"net/http"
|
|
"net/http"
|
|
|
"nhooyr.io/websocket"
|
|
"nhooyr.io/websocket"
|
|
|
"nhooyr.io/websocket/wsjson"
|
|
"nhooyr.io/websocket/wsjson"
|
|
|
- "context"
|
|
|
|
|
|
|
+ "time"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
func handleWebsocket(w http.ResponseWriter, r *http.Request) bool {
|
|
func handleWebsocket(w http.ResponseWriter, r *http.Request) bool {
|
|
@@ -34,7 +34,6 @@ func handleWebsocket(w http.ResponseWriter, r *http.Request) bool {
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
c.Close(websocket.StatusNormalClosure, "")
|
|
c.Close(websocket.StatusNormalClosure, "")
|
|
|
return true
|
|
return true
|
|
|
}
|
|
}
|