Make sure to unset the singleton instance on close

This commit is contained in:
Sarah Gerweck 2016-06-04 00:40:43 -07:00
parent e050f07692
commit 768fba21b0

View File

@ -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()
}
} }
} }