communicator/ssh: improved logging

This commit is contained in:
Mitchell Hashimoto 2013-07-14 21:07:32 +09:00
parent 387793b2d3
commit 07449a7801
1 changed files with 1 additions and 0 deletions

View File

@ -192,6 +192,7 @@ func (c *comm) newSession() (*ssh.Session, error) {
log.Println("opening new ssh session") log.Println("opening new ssh session")
session, err := c.client.NewSession() session, err := c.client.NewSession()
if err != nil { if err != nil {
log.Printf("ssh session open error: '%s', attempting reconnect", err)
if err := c.reconnect(); err != nil { if err := c.reconnect(); err != nil {
return nil, err return nil, err
} }