关机后断开webconsole连接

This commit is contained in:
屈轩
2018-12-24 21:47:38 +08:00
parent bac21fd477
commit 5f9cc3296a
4 changed files with 33 additions and 3 deletions

View File

@@ -105,6 +105,15 @@ func (c *SSHtoolSol) GetProtocol() string {
return PROTOCOL_TTY
}
func (c *SSHtoolSol) Connect() error {
conn, err := net.DialTimeout("tcp", c.IP+":22", time.Second*2)
if err != nil {
return err
}
defer conn.Close()
return nil
}
func (c *SSHtoolSol) GetData(data string) (isShow bool, ouput string, command string) {
if len(c.Username) == 0 {
if len(data) == 0 {