mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-03 23:20:25 +08:00
TOA通讯失败时,关闭连接
This commit is contained in:
@@ -86,6 +86,7 @@ func (this *TOAManager) SendMsg(msg string) error {
|
||||
if this.conn != nil {
|
||||
_, err := this.conn.Write([]byte(msg + "\n"))
|
||||
if err != nil {
|
||||
_ = this.conn.Close()
|
||||
this.conn = nil
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user