final InputStream inputStream = this.inputStream;
final StringBuilder b = new StringBuilder();
try {
for (;;) {
Status status = StreamUtils.readWord(inputStream, b);
<BUG>if (status == Status.END_OF_STREAM) {
return;</BUG>
}
try {
final Command command = Command.valueOf(b.toString());

final InputStream inputStream = this.inputStream;
final StringBuilder b = new StringBuilder();
try {
for (;;) {
Status status = StreamUtils.readWord(inputStream, b);
if (status == Status.END_OF_STREAM) {
log.info("Received end of stream, shutting down");
return;
}
try {
final Command command = Command.valueOf(b.toString());
