Better error message on connection closed