Skip to content

Commit

Permalink
Ignore empty messages at transport layer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthieu Boutier committed Nov 23, 2014
1 parent e1a89da commit f7bd46f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/network/networktransport.cc
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ template <class MyState, class RemoteState>
void Transport<MyState, RemoteState>::recv( void )
{
string s( connection.recv() );

if ( s.empty() ) {
return;
}

Fragment frag( s );

if ( fragments.add_fragment( frag ) ) { /* complete packet */
Expand Down

0 comments on commit f7bd46f

Please sign in to comment.