]> 127.0.0.1 Git - part/.git/commitdiff
1 v0.28.20240310091617
authorqydysky <qydysky@foxmail.com>
Sun, 10 Mar 2024 09:10:00 +0000 (17:10 +0800)
committerqydysky <qydysky@foxmail.com>
Sun, 10 Mar 2024 09:10:00 +0000 (17:10 +0800)
websocket/Server.go

index 839a8e6530a66e3b399e0f1cc7fe0f2a103868ac..a83833239620aa38c1bafad8c6590f8efd79c9b7 100644 (file)
@@ -39,6 +39,7 @@ func (t *Server) WS(w http.ResponseWriter, r *http.Request) (o chan uintptr) {
 
        ws, err := upgrader.Upgrade(w, r, nil)
        if err != nil {
+               w.WriteHeader(http.StatusBadRequest)
                t.ws_mq.Push_tag(`error`, err)
                return
        }