Proper disconnect when pressing escape