Prevent a double-free when the remote server forces a disconnect