From 3e7cfb45d39d9f99f2923a0896624bfb8726d719 Mon Sep 17 00:00:00 2001 From: zhenghe3119 Date: Fri, 28 Jun 2019 14:47:35 +0800 Subject: [PATCH] fix typo pool => poll --- client.go | 2 +- const.go | 4 ++-- poller.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index 2b5c72d..9928b73 100644 --- a/client.go +++ b/client.go @@ -45,7 +45,7 @@ func NewClient(conf *Conf) *Client { requester: newHTTPRequester(&http.Client{Timeout: queryTimeout}), } - client.longPoller = newLongPoller(conf, longPoolInterval, client.handleNamespaceUpdate) + client.longPoller = newLongPoller(conf, longPollInterval, client.handleNamespaceUpdate) client.ctx, client.cancel = context.WithCancel(context.Background()) return client } diff --git a/const.go b/const.go index 19694cd..659d387 100644 --- a/const.go +++ b/const.go @@ -8,8 +8,8 @@ const ( defaultConfName = "app.properties" defaultNamespace = "application" - longPoolInterval = time.Second * 2 - longPoolTimeout = time.Second * 90 + longPollInterval = time.Second * 2 + longPollTimeout = time.Second * 90 queryTimeout = time.Second * 2 defaultNotificationID = -1 ) diff --git a/poller.go b/poller.go index 1ea0545..a5f06f1 100644 --- a/poller.go +++ b/poller.go @@ -45,7 +45,7 @@ func newLongPoller(conf *Conf, interval time.Duration, handler notificationHandl poller := &longPoller{ conf: conf, pollerInterval: interval, - requester: newHTTPRequester(&http.Client{Timeout: longPoolTimeout}), + requester: newHTTPRequester(&http.Client{Timeout: longPollTimeout}), notifications: new(notificationRepo), handler: handler, }