Make shutdown handling predictable

This commit is contained in:
2015-10-18 03:22:07 +03:00
parent 559886f297
commit d847be21c6
6 changed files with 99 additions and 76 deletions
+1
View File
@@ -88,6 +88,7 @@ func Subscribe(consumer, topic string) satan.Streamer {
case err := <-pc.Errors():
log.Println("Kafka error:", err.Error())
case <-stream.shutdown:
pc.Close()
return
}
}