process ssh connection error

master
Dingjun 7 years ago
parent 17bf0ea0c1
commit fd1a8528d6

@ -74,7 +74,8 @@ func (cc *Client) Run() error {
Log(DEBUG, "wait all channel to be done") Log(DEBUG, "wait all channel to be done")
go cc.registerSignal() go cc.registerSignal()
go func() { go func() {
cc.sshConn.Wait() cc.err = cc.sshConn.Wait()
Log(DEBUG, "connection hang up")
close(cc.ch) close(cc.ch)
}() }()

Loading…
Cancel
Save