Skip to content

Commit

Permalink
docs: add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqixu committed Aug 23, 2024
1 parent 06080cf commit 9780e3a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/internal/httpsender.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ func (h *HTTPSender) receiveResponse(ctx context.Context, resp *http.Response) {
}

func (h *HTTPSender) SetHeartbeatInterval(duration time.Duration) {
// 0 is invalid for a http sender
if duration != 0 {
h.SetPollingInterval(duration)
}
Expand Down
2 changes: 1 addition & 1 deletion client/internal/wssender.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func (s *WSSender) StoppingErr() error {
return s.err
}

// SetHeartbeatInterval ...
// SetHeartbeatInterval sets the heartbeat interval and triggers timer reset.
func (s *WSSender) SetHeartbeatInterval(d time.Duration) {
s.heartbeatIntervalSeconds.Store(int64(d.Seconds()))
select {
Expand Down

0 comments on commit 9780e3a

Please sign in to comment.