fix: a nil pointer bug that may cause crash

This commit is contained in:
mzz2017 committed 2019-12-28 02:53:05 +08:00
1 parent 9905fa0cb4
commit e44823f8a6
3 files changed
+5 -3

No files matched your search

+2 -2
View File
@@ -154,7 +154,7 @@
TCPFastOpen
<b-tooltip
type="is-dark"
label="简化TCP握手流程以加速建立连接,可能会增加封包的特征。"
label="简化TCP握手流程以加速建立连接,可能会增加封包的特征。当前仅支持vmess节点。"
multilined
position="is-right"
>
@@ -176,7 +176,7 @@
多路复用
<b-tooltip
type="is-dark"
label="复用TCP连接以减少握手延迟,但会影响吞吐量大的使用场景,如观看视频、下载、测速。"
label="复用TCP连接以减少握手延迟,但会影响吞吐量大的使用场景,如观看视频、下载、测速。当前仅支持vmess节点。"
multilined
position="is-right"
>
+3 -1
View File
@@ -54,7 +54,9 @@ func (self *SSR) Serve(localPort int, cipher, passwd, address, port, obfs, obfsP
}
}()
<-self.c
_ = local.(*socks5.Socks5).TcpListener.Close()
if local.(*socks5.Socks5).TcpListener != nil {
_ = local.(*socks5.Socks5).TcpListener.Close()
}
}()
return err
}
View File
Whitespace-only changes.