diff --git a/client.go b/client.go index 8bcdebc..c3f69fb 100644 --- a/client.go +++ b/client.go @@ -74,7 +74,8 @@ func (cc *Client) Run() error { Log(DEBUG, "wait all channel to be done") go cc.registerSignal() go func() { - cc.sshConn.Wait() + cc.err = cc.sshConn.Wait() + Log(DEBUG, "connection hang up") close(cc.ch) }()