parveensania commented on code in PR #35901: URL: https://github.com/apache/beam/pull/35901#discussion_r2299426951
########## runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/streaming/harness/SingleSourceWorkerHarness.java: ########## @@ -179,8 +184,13 @@ private void streamingEngineDispatchLoop( // Reconnect every now and again to enable better load balancing. // If at any point the server closes the stream, we will reconnect immediately; otherwise // we half-close the stream after some time and create a new one. - if (!stream.awaitTermination(GET_WORK_STREAM_TIMEOUT_MINUTES, TimeUnit.MINUTES)) { - stream.halfClose(); + if (getWorkStream != null) { + if (!getWorkStream.awaitTermination(GET_WORK_STREAM_TIMEOUT_MINUTES, TimeUnit.MINUTES)) { + if (getWorkStream + != null) { // checking for null again to keep the static analyzer happy. + getWorkStream.halfClose(); Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org