Switch from golang.org/x/net/websocket to nhooyr.io/websocket and handle NotFound errors (#105)

* Switch from golang.org/x/net/websocket to nhooyr.io/websocket

* Do not attach errors that we can handle to the Gin's context

* Add missing newline to "no credentials specified or found, ..." message

* Fix potential NPE in ChooseUsernameAndPassword()

* Fix type in PortForward() error message in "orchard ssh vm"

* Fix potential NPE in Connections()

* Use header.Set() for consistency's sake for Authorization header
This commit is contained in:
Nikolay Edigaryev
2023-07-04 18:10:41 +04:00
committed by GitHub
parent 3c3b8e8180
commit 6a325daf74
9 changed files with 88 additions and 42 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ func Connections(left net.Conn, right net.Conn) (finalErr error) {
recordErr(<-rightErrCh)
}
if strings.Contains(finalErr.Error(), "use of closed network connection") {
if finalErr != nil && strings.Contains(finalErr.Error(), "use of closed network connection") {
finalErr = nil
}