From e768ef944c88be1b18c995544c76fa931d9c5916 Mon Sep 17 00:00:00 2001 From: Alexander Kiryukhin Date: Sun, 14 Feb 2021 13:21:37 +0300 Subject: Fix issue #3 --- api.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'api.go') diff --git a/api.go b/api.go index 77fe2dc..5e1421b 100644 --- a/api.go +++ b/api.go @@ -161,6 +161,9 @@ func (a *Api) getUpdates(limit int, timeout int, marker int64, types []string) ( } body, err := a.client.request(http.MethodGet, "updates", values, nil) if err != nil { + if err == errLongPollTimeout { + return result, nil + } return result, err } defer func() { -- cgit v1.2.3