The error propagation from srv.ListenAndServe did not work as intended, simplified it a bit and added a test for it.