client: add TODO for robust discovery error recovery

This commit is contained in:
vyzo 2018-04-25 11:06:08 +03:00
parent e530204107
commit aa7f9daaa8

View File

@ -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
}