Skip to content

Commit a882d1b

Browse files
committed
fix: reset timer each time stream is opened
1 parent b89478d commit a882d1b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/StreamingSubscriberConnection.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,8 @@ private void initialize() {
387387
}
388388

389389
if (enableKeepalive) {
390+
lastServerResponseTime.set(clock.nanoTime());
391+
lastClientPingTime.set(-1L);
390392
startClientPinger();
391393
startServerMonitor();
392394
}

0 commit comments

Comments
 (0)