felix
felix copied to clipboard
ws_ssh_term.go文件中63-67行的代码功能是什么?我注释掉后正常能ssh到指定服务器
client, err := flx.NewSshClient(mc)
if wshandleError(wsConn, err) {
return
}
defer client.Close()
startTime := time.Now()
//下面注释的这段代码功能是什么?我注释掉后还是正常能ssh到指定服务器
//ssConn, err := util.NewSshConn(cols, rows, client)
//if wshandleError(wsConn, err) {
// return
//}
//defer ssConn.Close()
sws, err := model.NewLogicSshWsSession(cols, rows, true, client, wsConn)
if wshandleError(wsConn, err) {
return
}
defer sws.Close()
quitChan := make(chan bool, 3)
sws.Start(quitChan)
go sws.Wait(quitChan)
上面注释掉的代码什么作用?注释后还能正常运行ssh到指定服务器
@mojocn