Fixed bug: Missed notifications after gate error response

After first error packet receiving  socket was recreated and valid notifications from cache were lost.
Also it was possible bug with StackOverflowException with recursive queue draining.