Catch socket exception when receiver closes and handles it the same way eof exception does