- 修复ssh连接协程泄漏的问题
This commit is contained in:
		| @ -82,19 +82,19 @@ func (ret *NextTerminal) Write(p []byte) (int, error) { | |||||||
| func (ret *NextTerminal) Close() error { | func (ret *NextTerminal) Close() error { | ||||||
|  |  | ||||||
| 	if ret.SftpClient != nil { | 	if ret.SftpClient != nil { | ||||||
| 		return ret.SftpClient.Close() | 		_ = ret.SftpClient.Close() | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if ret.SshSession != nil { | 	if ret.SshSession != nil { | ||||||
| 		return ret.SshSession.Close() | 		_ = ret.SshSession.Close() | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if ret.SshClient != nil { | 	if ret.SshClient != nil { | ||||||
| 		return ret.SshClient.Close() | 		_ = ret.SshClient.Close() | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	if ret.Recorder != nil { | 	if ret.Recorder != nil { | ||||||
| 		return ret.Close() | 		ret.Recorder.Close() | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| 	return nil | 	return nil | ||||||
|  | |||||||
		Reference in New Issue
	
	Block a user