diff options
Diffstat (limited to 'client.go')
-rw-r--r-- | client.go | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -26,7 +26,14 @@ func (h *ClientHandler) ServiceConnection(proxyconn net.Conn) { | |||
26 | 26 | ||
27 | log.Println("Connected to server") | 27 | log.Println("Connected to server") |
28 | 28 | ||
29 | serviceBoth(wsconn, proxyconn, h.Context) | 29 | errc := make(chan error) |
30 | ws := &WebsocketReadWriter{wsconn} | ||
31 | |||
32 | go serviceBoth(proxyconn, ws, errc) | ||
33 | go serviceBoth(ws, proxyconn, errc) | ||
34 | |||
35 | <-errc | ||
36 | log.Println("Closing client connection") | ||
30 | } | 37 | } |
31 | 38 | ||
32 | func (h *ClientHandler) Run() { | 39 | func (h *ClientHandler) Run() { |