Make sure to unset the singleton instance on close
This commit is contained in:
parent
e050f07692
commit
768fba21b0
@ -31,5 +31,10 @@ abstract class SingletonStage {
|
|||||||
protected trait ParentStage extends Stage {
|
protected trait ParentStage extends Stage {
|
||||||
require(singletonStage.isEmpty, s"Cannot have two ${name} stages")
|
require(singletonStage.isEmpty, s"Cannot have two ${name} stages")
|
||||||
logger.debug(s"Creating singleton ${name} stage")
|
logger.debug(s"Creating singleton ${name} stage")
|
||||||
|
|
||||||
|
override def close() = {
|
||||||
|
singletonStage = None
|
||||||
|
super.close()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user