cleanup if server close throws