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:
Tony Garnock-Jones 2018-03-06 11:12:57 +00:00
parent 62f8385b24
commit 57a40e9576
1 changed files with 1 additions and 1 deletions

View File

@ -93,7 +93,7 @@
[(message (inbound (? udp-packet? p)))
(transition s (message p))]
[(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]))
(void)