We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3313cb3 + 3092e9c commit de349a7Copy full SHA for de349a7
1 file changed
go/logic/server.go
@@ -98,8 +98,13 @@ func (this *Server) Serve() (err error) {
98
}
99
100
func (this *Server) handleConnection(conn net.Conn) (err error) {
101
- defer conn.Close()
+ if conn != nil {
102
+ defer conn.Close()
103
+ }
104
command, _, err := bufio.NewReader(conn).ReadLine()
105
+ if err != nil {
106
+ return err
107
108
return this.onServerCommand(string(command), bufio.NewWriter(conn))
109
110
0 commit comments