Properly assert tcp-port-allocation for a listener.
This commit is contained in:
parent
0206dec737
commit
0db231575c
23
tcp.rkt
23
tcp.rkt
|
@ -56,17 +56,18 @@
|
|||
(lambda (server-addr)
|
||||
(match-define (tcp-listener port) server-addr)
|
||||
;; TODO: have listener shut down once user-level listener does
|
||||
(spawn (lambda (e s) #f)
|
||||
(void)
|
||||
(assertion (tcp-port-allocation port server-addr)))
|
||||
(spawn-demand-matcher
|
||||
(advertise (tcp-channel (?! (tcp-address ? ?))
|
||||
(?! (tcp-address ? port))
|
||||
?))
|
||||
(observe (tcp-channel (?! (tcp-address ? ?))
|
||||
(?! (tcp-address ? port))
|
||||
?))
|
||||
(spawn-relay server-addr))))
|
||||
(list
|
||||
(spawn (lambda (e s) #f)
|
||||
(void)
|
||||
(scn (assertion (tcp-port-allocation port server-addr))))
|
||||
(spawn-demand-matcher
|
||||
(advertise (tcp-channel (?! (tcp-address ? ?))
|
||||
(?! (tcp-address ? port))
|
||||
?))
|
||||
(observe (tcp-channel (?! (tcp-address ? ?))
|
||||
(?! (tcp-address ? port))
|
||||
?))
|
||||
(spawn-relay server-addr)))))
|
||||
(spawn-demand-matcher (advertise (tcp-channel (?! (tcp-handle ?)) (?! (tcp-address ? ?)) ?))
|
||||
(observe (tcp-channel (?! (tcp-handle ?)) (?! (tcp-address ? ?)) ?))
|
||||
allocate-port-and-spawn-socket)
|
||||
|
|
Loading…
Reference in New Issue