summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSam Hitz <samuel.hitz@gmail.com>2018-04-27 14:28:05 +0200
committerSam Hitz <samuel.hitz@gmail.com>2018-04-27 14:28:05 +0200
commitcf28f67a87c875d1c627e46d7a816d1635ae9a05 (patch)
treea469e7513e1efc540a72f066cd6a971ccf6e4187
parentea877dc6111f89c1fe4493e0b709f99448fd70a1 (diff)
Close incoming channel in zapi on receive error
-rw-r--r--zebra/zapi.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/zebra/zapi.go b/zebra/zapi.go
index b20da8e5..942e8699 100644
--- a/zebra/zapi.go
+++ b/zebra/zapi.go
@@ -623,6 +623,7 @@ func NewClient(network, address string, typ ROUTE_TYPE, version uint8) (*Client,
// Start receive loop only when the first message successfully received.
go func() {
+ defer close(incoming)
for {
if m, err := receiveSingleMsg(); err != nil {
return