player name selection no longer blocks new connections

master
Jordan Orelli 6 years ago
parent 495f4c3fa2
commit 5ce9a530f8

@ -55,7 +55,8 @@ func bail(status int, template string, args ...interface{}) {
os.Exit(status) os.Exit(status)
} }
func handleConnection(conn *Connection) { func handleConnection(sock net.Conn) {
conn := NewConnection(sock)
defer conn.Close() defer conn.Close()
c := make(chan []string) c := make(chan []string)
@ -99,7 +100,7 @@ func main() {
log_error("error accepting connection: %v", err) log_error("error accepting connection: %v", err)
continue continue
} }
go handleConnection(NewConnection(conn)) go handleConnection(conn)
} }
} }

Loading…
Cancel
Save