Skip to content

Commit 72e09fc

Browse files
author
Shlomi Noach
authored
Merge pull request #56 from github/tcp-nil-fix
fixed nil TCP listener when TCP undfined
2 parents 0d8d366 + 2cdc72b commit 72e09fc

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

go/logic/server.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ func (this *Server) Serve() (err error) {
7070
}
7171
}()
7272
go func() {
73+
if this.tcpListener == nil {
74+
return
75+
}
7376
for {
7477
conn, err := this.tcpListener.Accept()
7578
if err != nil {

0 commit comments

Comments
 (0)