Skip to content

Commit

Permalink
Fixed crash when no data sent to server port
Browse files Browse the repository at this point in the history
  • Loading branch information
metall0id committed May 28, 2012
1 parent 4e5140e commit e64922a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/src/com/mwr/mercury/SessionThread.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ public void run()
{
while (currentSession.connected)
{
String received = currentSession.receive();

//Pass off command to be handled
handleCommand(currentSession.receive());
if (received.length() > 0) //Check that it is not null
handleCommand(received);
}
Log.e("mercury", "Exiting thread");
}
Expand Down

0 comments on commit e64922a

Please sign in to comment.