player name selection no longer blocks new connections

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

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

Loading…
Cancel
Save