Ensure that failing connections are closed