[erlang-questions] terminate supervisor from it's child process
block.rxckin.beats@REDACTED
block.rxckin.beats@REDACTED
Thu Feb 14 06:17:09 CET 2019
Hi
I'm writing udp server with supervision tree like below.
```
(s1for1) (1for1)
server_sup - udp_sup - |- udp_worker
|- dtls_worker
|- stun_worker
|- srtp_worker
```
1. app opening UDP socket
2. server_sup spawn udp_sup process tree with that udp socket
3. udp_worker receives every packet from socket
4. udp_woker passing packet to other worker based on first byte
demultiplexing
Question:
when timeout in udp_worker happen,
I wanna terminate all processes in udp_sup (including udp_sup)
so I tried shutdown udp_sup with calling `server_sup:terminate_child(pid)`
that's terminates but rises SUPERVISOR REPORT with shutdown_error.
I also tried one_for_all for udp_sup's childspec but I don't want to
restart children because UDP socket already timeouted.
is there any way to terminate supervisor from it's child process ?
or any other recommended process architecture for UDP server ?
thanks
Jxck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20190214/afa1969b/attachment.htm>
More information about the erlang-questions
mailing list