Asynchronously send UDP packets.
Switch from synchronous to asynchronous UDP transmission, in case DNS resolution takes a long time or fails. Specifically, in case of failure, previously the UDP actor would crash, whereas now the packet is just "dropped".
This commit is contained in:
parent
62f8385b24
commit
57a40e9576
|
@ -93,7 +93,7 @@
|
||||||
[(message (inbound (? udp-packet? p)))
|
[(message (inbound (? udp-packet? p)))
|
||||||
(transition s (message p))]
|
(transition s (message p))]
|
||||||
[(message (udp-packet _ (udp-remote-address host port) body))
|
[(message (udp-packet _ (udp-remote-address host port) body))
|
||||||
(udp:udp-send-to socket host port body)
|
(thread (lambda () (udp:udp-send-to socket host port body)))
|
||||||
#f]
|
#f]
|
||||||
[_ #f]))
|
[_ #f]))
|
||||||
(void)
|
(void)
|
||||||
|
|
Loading…
Reference in New Issue