remove Supervisor jobs, allow exceptions to stop the whole application
This commit is contained in:
parent
7c77083c89
commit
775fd4c5b3
2 changed files with 2 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ internal class KafkatorioTopology(
|
|||
) : CoroutineScope {
|
||||
|
||||
override val coroutineContext: CoroutineContext =
|
||||
Dispatchers.Default + SupervisorJob(rootJob) + CoroutineName("KafkatorioTopology")
|
||||
Dispatchers.Default + rootJob + CoroutineName("KafkatorioTopology")
|
||||
|
||||
fun start() {
|
||||
splitPackets()
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import org.http4k.websocket.WsStatus
|
|||
class WebsocketServer {
|
||||
|
||||
// create a scope+job for the server
|
||||
private val serverJob = SupervisorJob()
|
||||
private val serverJob = KafkatorioTopology.rootJob
|
||||
private val serverScope = CoroutineScope(serverJob)
|
||||
|
||||
private val clients: MutableSharedFlow<Websocket> = MutableSharedFlow(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue