fixed nil TCP listener when TCP undfined

This commit is contained in:
Shlomi Noach 2016-06-07 14:24:30 +02:00
parent 0d8d366903
commit 2cdc72bd1c

View File

@ -70,6 +70,9 @@ func (this *Server) Serve() (err error) {
}
}()
go func() {
if this.tcpListener == nil {
return
}
for {
conn, err := this.tcpListener.Accept()
if err != nil {