Update relay.go

This commit is contained in:
syssecfsu 2022-01-11 22:57:23 -05:00 committed by GitHub
parent 5cd1bb8d38
commit d956e4de21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -309,7 +309,7 @@ func handlePlayer(w http.ResponseWriter, r *http.Request, cmdline []string) {
} }
defer tc.release() defer tc.release()
log.Println("\n\nCreated the websocket") log.Println("Created the websocket to", ws.RemoteAddr().String())
tc.ws_done = make(chan struct{}) tc.ws_done = make(chan struct{})
tc.pty_done = make(chan struct{}) tc.pty_done = make(chan struct{})
@ -346,7 +346,7 @@ func handleViewer(w http.ResponseWriter, r *http.Request, path string) {
return return
} }
log.Println("\n\nCreated the websocket") log.Println("Created the websocket to", ws.RemoteAddr().String())
if !registry.sendToPlayer(path, ws) { if !registry.sendToPlayer(path, ws) {
log.Println("Failed to send websocket to player, close it") log.Println("Failed to send websocket to player, close it")
ws.Close() ws.Close()