Fixed a rare crash case when authserver socket was forcefully closed during read

Closes #12634