Avoid double-fin (!).
This commit is contained in:
parent
a86eb10494
commit
38e3c9de0f
9
tcp.rkt
9
tcp.rkt
|
@ -536,10 +536,13 @@
|
|||
|
||||
;; ConnState -> Transition
|
||||
(define (close-outbound-stream s)
|
||||
(define b (conn-state-outbound s))
|
||||
(transition
|
||||
(struct-copy conn-state s
|
||||
[outbound (struct-copy buffer (buffer-push (conn-state-outbound s) #"!") ;; dummy FIN byte
|
||||
[finished? #t])])
|
||||
(if (buffer-finished? b)
|
||||
s
|
||||
(struct-copy conn-state s
|
||||
[outbound (struct-copy buffer (buffer-push b #"!") ;; dummy FIN byte
|
||||
[finished? #t])]))
|
||||
'()))
|
||||
|
||||
(define (state-vector-behavior e s)
|
||||
|
|
Loading…
Reference in New Issue