diff options
Diffstat (limited to 'client/proxy.go')
| -rw-r--r-- | client/proxy.go | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/client/proxy.go b/client/proxy.go index 31a17a6..721dcac 100644 --- a/client/proxy.go +++ b/client/proxy.go @@ -28,7 +28,16 @@ func (c *Client) StartProxyguard(ck *cookie.Cookie, listen string, tcpsp int, pe var err error proxyguard.UpdateLogger(&ProxyLogger{}) proxyguard.GotClientFD = gotFD - proxyguard.ClientProxyReady = ready + proxyguard.ClientProxyReady = func() { + // already connected + // no need to signal to the client that the proxy is ready + if c.InState(StateConnected) { + log.Logger.Debugf("proxyguard is ready again when the client was already connected") + return + } + log.Logger.Debugf("forwarding proxyguard ready callback to client") + ready() + } u, err := url.Parse(peer) if err != nil { |
