From aa7f9daaa8818ae17ea2e157361e228f7703d3d0 Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 25 Apr 2018 11:06:08 +0300 Subject: [PATCH] client: add TODO for robust discovery error recovery --- client.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/client.go b/client.go index e65b690..bf2daa3 100644 --- a/client.go +++ b/client.go @@ -215,6 +215,9 @@ func discoverAsync(ctx context.Context, ns string, s inet.Stream, ch chan Regist for { regs, cookie, err = discoverQuery(ns, batch, cookie, r, w) if err != nil { + // TODO robust error recovery + // - handle closed streams with backoff + new stream, preserving the cookie + // - handle E_INVALID_COOKIE errors in that case to restart the discovery log.Errorf("Error in discovery [%s]: %s", ns, err.Error()) return }