If server.Stop() and server.Serve() race, Serve() can return without closing the listener. This in turn can lead to clients timing out trying to connect to a server that is neither accepting nor rejecting connections.