diff options
Diffstat (limited to 'server.go')
-rw-r--r-- | server.go | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -42,5 +42,12 @@ func (h *ServerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { | |||
42 | 42 | ||
43 | log.Println("Connected to SSH server") | 43 | log.Println("Connected to SSH server") |
44 | 44 | ||
45 | serviceBoth(wsconn, proxyconn, r.Context()) | 45 | errc := make(chan error) |
46 | ws := &WebsocketReadWriter{wsconn} | ||
47 | |||
48 | go serviceBoth(proxyconn, ws, errc) | ||
49 | go serviceBoth(ws, proxyconn, errc) | ||
50 | |||
51 | <-errc | ||
52 | log.Println("Closing client server") | ||
46 | } | 53 | } |