Skip to content

Commit dd4e702

Browse files
committed
Addressed comments.
1 parent 3d56106 commit dd4e702

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

streaming/src/main/scala/org/apache/spark/streaming/StreamingContext.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,7 @@ class StreamingContext private[streaming] (
591591
* received data to be completed
592592
*/
593593
def stop(stopSparkContext: Boolean, stopGracefully: Boolean): Unit = synchronized {
594+
state = STOPPED
594595
state match {
595596
case INITIALIZED =>
596597
logWarning("StreamingContext has not been started yet")
@@ -607,7 +608,6 @@ class StreamingContext private[streaming] (
607608
if (stopSparkContext) sc.stop()
608609
uiTab.foreach(_.detach())
609610
// The state should always be Stopped after calling `stop()`, even if we haven't started yet:
610-
state = STOPPED
611611
}
612612
}
613613

0 commit comments

Comments
 (0)