mirror of
https://github.com/m1k1o/neko.git
synced 2025-07-30 23:09:01 +02:00
ws upgrade fail error message.
This commit is contained in:
parent
4b39607af0
commit
e1ef49c46a
1 changed files with 3 additions and 1 deletions
|
@ -33,7 +33,9 @@ func New(conf *config.Server, webSocketHandler types.WebSocketHandler) *Server {
|
|||
router.Use(customMiddleware.Logger) // Log API request calls using custom logger function
|
||||
|
||||
router.Get("/ws", func(w http.ResponseWriter, r *http.Request) {
|
||||
webSocketHandler.Upgrade(w, r)
|
||||
if webSocketHandler.Upgrade(w, r) != nil {
|
||||
w.Write([]byte("unable to upgrade your connection to a websocket"))
|
||||
}
|
||||
})
|
||||
|
||||
fs := http.FileServer(http.Dir(conf.Static))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue