Skip to content

Commit 351b024

Browse files
committed
change sub ti since
1 parent d6bb1c4 commit 351b024

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

examples/getting_started.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func main() {
110110
streamName,
111111
handleMessages,
112112
stream.NewConsumerOptions().
113-
SetConsumerName("my_consumer"). // set a consumer name
113+
SetConsumerName("my_consumer"). // set a consumer name
114114
SetOffset(stream.OffsetSpecification{}.First())) // start consuming from the beginning
115115
CheckErr(err)
116116
channelClose := consumer.NotifyClose()

examples/offsetTracking/offsetTracking.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func main() {
8080
streamName,
8181
handleMessages,
8282
stream.NewConsumerOptions().
83-
SetConsumerName("my_consumer"). // set a consumer name
83+
SetConsumerName("my_consumer"). // set a consumer name
8484
SetOffset(stream.OffsetSpecification{}.LastConsumed())) // start consuming from the beginning
8585
CheckErr(err)
8686

pkg/stream/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ func (c *Client) heartBeat() {
326326
}
327327
return
328328
case <-ticker.C:
329-
if time.Now().Sub(c.lastHeartBeat) > 60*time.Second {
329+
if time.Since(c.lastHeartBeat) > 60*time.Second {
330330
v := atomic.AddInt32(&heartBeatMissed, 1)
331331
logs.LogWarn("Missing heart beat %d", v)
332332
if v > 3 {

pkg/stream/server_frame.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,6 @@ func (c *Client) closeFrameHandler(readProtocol *ReaderProtocol, r *bufio.Reader
473473

474474
}
475475

476-
477476
func (c *Client) handleHeartbeat() {
478477
c.lastHeartBeat = time.Now()
479-
}
478+
}

0 commit comments

Comments
 (0)