Closed tdroxler closed 9 months ago
Hi @tdroxler,
You need to call cancel(true)
on the future to close the StreamMessageProducer
, which will break the loop in the StreamMessageProducer.listen
method.
HTH
See also #585.
Thx for your quick answer, I guess I'll go with something like (pseudo code and scala
):
override def exit(): Unit = {
server.listener.cancel(true)
if(server.shutdownReceived) {
System.exit(0)
} else {
System.exit(1)
}
}
checking the shutdownReceived
to follow the exit specs
LGTM 👍
Hi everyone,
quick question, I'm starting my server with the
startListening
function and get back theFuture[Void]
. When my server receive theexit
notification (after the obviousshutdown
), do I need tocancel
or clean in any other way mylistnener
(theFuture[Void]
)?Thx