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 {
|
||||
try {
|
||||
if (socket != null) {
|
||||
poller.unregister(socket)
|
||||
if (socket != null) socket.close
|
||||
socket.close
|
||||
}
|
||||
} finally {
|
||||
notifyListener(Closed)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue