Skip to content

Commit

Permalink
recv return ssize_t, not size_t. Fixes failure to detect recv failed
Browse files Browse the repository at this point in the history
  • Loading branch information
orenmnero committed Sep 15, 2014
1 parent 8eef32a commit 0abb64a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/C++/SocketConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ bool SocketConnection::isValidSession()
void SocketConnection::readFromSocket()
throw( SocketRecvFailed )
{
size_t size = recv( m_socket, m_buffer, sizeof(m_buffer), 0 );
ssize_t size = recv( m_socket, m_buffer, sizeof(m_buffer), 0 );
if( size <= 0 ) throw SocketRecvFailed( size );
m_parser.addToStream( m_buffer, size );
}
Expand Down

0 comments on commit 0abb64a

Please sign in to comment.