Always listen for EOF, even if we have no inbound credit.

This commit is contained in:
Tony Garnock-Jones 2012-06-11 12:27:17 -04:00
parent 51960662d4
commit 75d40c7abc
1 changed files with 5 additions and 0 deletions

View File

@ -202,6 +202,11 @@
(extend-transition (adjust-credit state (- len))
(send-message (tcp-channel remote-addr local-addr bs)))])])))))
(transition (tcp-connection-state 'bytes 0)
(role 'explicit-eof-listener (topic-subscriber (cons (eof-evt cin) (wild)))
#:state state
[(cons (? evt?) _)
(close-transition state #t)])
(role 'outbound-relay (topic-subscriber (tcp-channel local-addr remote-addr (wild)))
#:state state
#:on-absence (close-transition state #f)