mux on ssh
This commit is contained in:
parent
3540b638f6
commit
fbd01cf7ab
|
@ -47,7 +47,9 @@ func (m *Manager) run(host string, client *ssh.Client, cmd string) ([]byte, erro
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Log.Warnf("can not create session on %s: %s", host, err)
|
log.Log.Warnf("can not create session on %s: %s", host, err)
|
||||||
|
m.clientsMUX.Lock()
|
||||||
delete(m.clients, host)
|
delete(m.clients, host)
|
||||||
|
m.clientsMUX.Unlock()
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
stdout, err := session.StdoutPipe()
|
stdout, err := session.StdoutPipe()
|
||||||
|
|
Loading…
Reference in New Issue