Browse Source

Fix abort()

Add a missing return, and zero out the subscriptions when we're done.
Evan Huus 10 years ago
parent
commit
9d4ca029b1
1 changed files with 3 additions and 0 deletions
  1. 3 0
      offset_manager.go

+ 3 - 0
offset_manager.go

@@ -392,6 +392,7 @@ func (bom *brokerOffsetManager) flushToBroker() {
 
 	if err != nil {
 		bom.abort(err)
+		return
 	}
 
 	for s := range bom.subscriptions {
@@ -463,4 +464,6 @@ func (bom *brokerOffsetManager) abort(err error) {
 			s.rebalance <- none{}
 		}
 	}
+
+	bom.subscriptions = make(map[*partitionOffsetManager]none)
 }