@@ -113,7 +113,7 @@ public class Subscriber {
113113 20 * 1024 * 1024 ; // 20MB API maximum message size.
114114 private static final int INITIAL_ACK_DEADLINE_SECONDS = 10 ;
115115 private static final int MAX_ACK_DEADLINE_SECONDS = 600 ;
116- private static final int MIN_ACK_DEADLINE_SECONDS = 10 ;
116+ static final int MIN_ACK_DEADLINE_SECONDS = 10 ;
117117 private static final Duration ACK_DEADLINE_UPDATE_PERIOD = Duration .standardMinutes (1 );
118118 private static final double PERCENTILE_FOR_ACK_DEADLINE_UPDATES = 99.9 ;
119119
@@ -333,7 +333,9 @@ public void close() throws IOException {
333333 @ Override
334334 protected void doStart () {
335335 logger .log (Level .INFO , "Starting subscriber group." );
336- startStreamingConnections ();
336+ // Streaming pull is not enabled on the service yet.
337+ // startStreamingConnections();
338+ startPollingConnections ();
337339 notifyStarted ();
338340 }
339341
@@ -422,7 +424,9 @@ public void run() {
422424
423425 private void stopAllStreamingConnections () {
424426 stopConnections (streamingSubscriberConnections );
425- ackDeadlineUpdater .cancel (true );
427+ if (ackDeadlineUpdater != null ) {
428+ ackDeadlineUpdater .cancel (true );
429+ }
426430 }
427431
428432 private void startPollingConnections () {
0 commit comments