فهرست منبع

Fix nil-pointer panic in consumer.

As was revealed during real-world use, if the broker we start with errors (and
returns a nil response) but we successfully find a new broker to talk to, we
have to start the loop again to get an actual response from the new broker.
Proceeding with the nil response just causes it to panic immediately.

Add the missing `continue` statement.
Evan Huus 12 سال پیش
والد
کامیت
6b3b02e129
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      consumer.go

+ 1 - 0
consumer.go

@@ -156,6 +156,7 @@ func (c *Consumer) fetchMessages() {
 					return
 				}
 			}
+			continue
 		}
 
 		block := response.GetBlock(c.topic, c.partition)