From e8ecb9e9104d0976777e0e8ae58238939a55cfea Mon Sep 17 00:00:00 2001 From: Ermachkov Yaroslav Date: Sat, 20 Dec 2025 05:35:15 +0300 Subject: [PATCH] test: fix flaky test Fixing mistakes in previous `errcheck` commit. Closes #514 --- connection.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/connection.go b/connection.go index 931c2635..3ad3c0a2 100644 --- a/connection.go +++ b/connection.go @@ -1485,9 +1485,7 @@ func (conn *Connection) newWatcherImpl(key string, callback WatchCallback) (Watc // request will not be finished by a small per-request // timeout. req := newWatchRequest(key).Context(context.Background()) - if _, err = conn.Do(req).Get(); err != nil { - return - } + _, _ = conn.Do(req).Get() } } @@ -1510,9 +1508,7 @@ func (conn *Connection) newWatcherImpl(key string, callback WatchCallback) (Watc // not be finished by a small per-request timeout to // avoid lost of the request. req := newUnwatchRequest(key).Context(context.Background()) - if _, err = conn.Do(req).Get(); err != nil { - return - } + _, err = conn.Do(req).Get() } conn.watchMap.Delete(key) close(state.unready)