Be a bit more strict on input in order to reduce leaking.

This commit is contained in:
StevenLawson 2014-09-07 11:22:13 -04:00
parent bc3ff0312f
commit 016ed9488d

View file

@ -272,10 +272,14 @@ public final class ClientSession extends Thread
} }
catch (IOException ex) catch (IOException ex)
{ {
continue; break;
} }
if (input == null || input.isEmpty()) // End of stream if (input == null)
{
break;
}
if (input.isEmpty())
{ {
continue; continue;
} }
@ -319,10 +323,14 @@ public final class ClientSession extends Thread
} }
catch (IOException ex) catch (IOException ex)
{ {
continue; break;
} }
if (input == null || input.isEmpty()) // End of stream if (input == null)
{
break;
}
if (input.isEmpty())
{ {
continue; continue;
} }
@ -371,7 +379,7 @@ public final class ClientSession extends Thread
} }
catch (IOException ex) catch (IOException ex)
{ {
continue; break;
} }
if (command == null) if (command == null)