make absolutely sure that a session is always removed from the connection even if there is a failure while closing