Guest User

Untitled

a guest
Jul 18th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. 0 libSystem.B.dylib 0x00007fff85434e4e __semwait_signal_nocancel + 10
  2. 1 libSystem.B.dylib 0x00007fff85434d50 nanosleep$NOCANCEL + 129
  3. 2 libSystem.B.dylib 0x00007fff854916ae usleep$NOCANCEL + 57
  4. 3 libSystem.B.dylib 0x00007fff854b0ce0 abort + 93
  5. 4 libSystem.B.dylib 0x00007fff853c86b5 free + 128
  6. 5 y.exe 0x0000000100013bcb std::string::_Rep::_M_destroy(std::allocator<char> const&) + 39
  7. 6 y.exe 0x0000000100001d48 boost::system::system_error::~system_error() + 54
  8. 7 x.dylib 0x000000010310aab0 Sockets::SocketBase<boost::asio::ip::tcp>::ThrowOnError(boost::system::error_code const&) + 248
  9. 8 x.dylib 0x00000001030e95c6 Sockets::TCPClientSocket::ReceiveBytes(char*, unsigned int, unsigned int) + 2700
  10.  
  11. bool Socket::ThrowOnError( const boost::system::error_code& socketError )
  12. {
  13. try
  14. {
  15. if ( socketError )
  16. {
  17. switch( socketError.value( ) )
  18. {
  19. case boost::asio::error::operation_aborted: // canceled
  20. return true;
  21. case boost::asio::error::eof:
  22. case boost::asio::error::connection_reset:
  23. case boost::asio::error::network_reset:
  24. {
  25. m_socket.close( );
  26. throw SocketClosed( socketError );
  27. }
  28. default:
  29. throw boost::system::system_error( socketError );
  30. }
  31. }
  32. return false;
  33. }
  34. MACRO_CATCH_AND_RETHROW( SocketClosed )
  35. MACRO_CATCH_AND_RETHROW( boost::system::system_error )
  36. }
  37.  
  38.  
  39. unsigned int Socket::ReceiveBytes( char* pDestinationBuffer,
  40. unsigned int bufferLengthBytes,
  41. unsigned int timeoutMsecs /* = DEFAULT_RECEIVE_TIMEOUT */ )
  42. {
  43. try
  44. {
  45. //Asynchronous socket receive logic
  46.  
  47. if ( ThrowOnError( m_receiveError ) )
  48. {
  49. // operation canceled
  50. return 0;
  51. }
  52.  
  53. if ( m_readBytes == 0 )
  54. {
  55. throw SocketClosed( );
  56. }
  57. return m_readBytes;
  58. }
  59.  
  60. MACRO_CATCH_AND_RETHROW( SocketClosed )
  61. MACRO_CATCH_AND_RETHROW( ReceiveTimedOut )
  62. catch( boost::system::system_error& ex )
  63. {
  64. throw ReceiveFailed( ex );
  65. }
  66. return 0;
  67. }
Add Comment
Please, Sign In to add comment