Skip to content

Commit

Permalink
fix typo pool => poll
Browse files Browse the repository at this point in the history
  • Loading branch information
zhenghe3119 committed Jun 28, 2019
1 parent c823613 commit 3e7cfb4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions const.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
2 changes: 1 addition & 1 deletion poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
Expand Down

0 comments on commit 3e7cfb4

Please sign in to comment.