Skip to content

Commit

Permalink
return earlier when there is no record
Browse files Browse the repository at this point in the history
  • Loading branch information
gdusbabek committed Dec 22, 2010
1 parent 4a6fe2d commit 7dac592
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/com/rackspace/flewton/CollectorHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ record = new Recordv5(buff);
logger.warn(String.format("Netflow v%d is not supported", version));
if (logger.isDebugEnabled())
logPacket(e.getRemoteAddress(), buff.duplicate());
return;
} else
throw new UnsupportedOperationException(
String.format("Netflow v%d is not supported", version));
Expand All @@ -83,9 +84,9 @@ record = new Recordv5(buff);
}

// Send record to backends
if (record != null)
for (IBackend backend : backEnds)
backend.write(record);
assert record != null;
for (IBackend backend : backEnds)
backend.write(record);
}

// dumps the contents of a buffer
Expand Down

0 comments on commit 7dac592

Please sign in to comment.