Skip to content
Browse files

fix blacklist for case where there's an error on initial connection t…

…o kestrel
  • Loading branch information...
1 parent 00cce21 commit 50f8043a1b9ba23179584b781eb4963018b12d6a @nathanmarz committed Sep 22, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/jvm/backtype/storm/spout/KestrelSpout.java
View
3 src/jvm/backtype/storm/spout/KestrelSpout.java
@@ -151,7 +151,10 @@ public void nextTuple() {
private void blacklist(KestrelClientInfo info, Throwable t) {
LOG.warn("Failed to read from Kestrel at " + info.host + ":" + info.port, t);
try {
+ //this case can happen when it fails to connect to Kestrel (and so never stores the connection)
+ if(info.client!=null) {
info.client.close();
+ }
} catch (IOException ex) {
LOG.warn("Failed to close Kestrel client at " + info.host + ":" + info.port, t);
}

0 comments on commit 50f8043

Please sign in to comment.
Something went wrong with that request. Please try again.