Improved failsafe close handling for half closed endpoints