Do not tinker with the 0mq socket for the ConnectionSocketActor on Restart
This commit is contained in:
parent
8163555378
commit
2ee712a8b1
2 changed files with 11 additions and 3 deletions
|
|
@ -131,10 +131,18 @@ private[zeromq] class ConcurrentSocketActor(params: Seq[SocketOption]) extends A
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override def preRestart(reason: Throwable, message: Option[Any]) {
|
||||||
|
context.children foreach context.stop //Do not call postStop
|
||||||
|
}
|
||||||
|
|
||||||
|
override def postRestart(reason: Throwable) {} //Do nothing
|
||||||
|
|
||||||
override def postStop {
|
override def postStop {
|
||||||
try {
|
try {
|
||||||
|
if (socket != null) {
|
||||||
poller.unregister(socket)
|
poller.unregister(socket)
|
||||||
if (socket != null) socket.close
|
socket.close
|
||||||
|
}
|
||||||
} finally {
|
} finally {
|
||||||
notifyListener(Closed)
|
notifyListener(Closed)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue