introduce clear_notifications
don't try and connect when reading an error off a closing connection