fixed nil TCP listener when TCP undfined
This commit is contained in:
parent
0d8d366903
commit
2cdc72bd1c
@ -70,6 +70,9 @@ func (this *Server) Serve() (err error) {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
go func() {
|
go func() {
|
||||||
|
if this.tcpListener == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
for {
|
for {
|
||||||
conn, err := this.tcpListener.Accept()
|
conn, err := this.tcpListener.Accept()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user