Use terminate message in eos listener actors 11/97411/3
authorTomas Cere <tomas.cere@pantheon.tech>
Tue, 7 Sep 2021 09:49:19 +0000 (11:49 +0200)
committerRobert Varga <nite@hq.sk>
Wed, 8 Sep 2021 11:52:06 +0000 (11:52 +0000)
commita7cba37aae3d2fcbb7d87ef86beea2261319e7ae
treef2d49d18a938d430cb09035622449aacc93edfcc
parente2c835865f5c6534758d2bfd0451efef1545a98f
Use terminate message in eos listener actors

getContext().stop() can cause NPE during actor system
shutdown so lets use a terminate message here instead.
Its still possible to get dead letters with this approach
when the child actor was stopped first during the shutdown,
but at least we prevent the NPEs.

JIRA: CONTROLLER-1989
Change-Id: Id38b56c12141164d45ed19613885a4d9f650e4dd
Signed-off-by: Tomas Cere <tomas.cere@pantheon.tech>
opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/EntityTypeListenerActor.java
opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/EntityTypeListenerRegistry.java
opendaylight/md-sal/eos-dom-akka/src/main/java/org/opendaylight/controller/eos/akka/registry/listener/type/command/TerminateListener.java [new file with mode: 0644]