Check for EOF even when there are no credits
This commit is contained in:
parent
2b18bb5b36
commit
3fe5d3a343
|
@ -152,7 +152,9 @@
|
|||
[_ (enqueue credits (cons +inf.0 mode))]))]))
|
||||
(match (dequeue* credits)
|
||||
[(list)
|
||||
never-evt]
|
||||
(handle-evt (eof-evt i)
|
||||
(lambda _ignored
|
||||
(eof-and-finish)))]
|
||||
[(list (cons count (and mode (Mode-bytes))) q)
|
||||
(define buffer (make-bytes (inexact->exact (min count 131072))))
|
||||
(handle-evt (read-bytes-avail!-evt buffer i)
|
||||
|
|
Loading…
Reference in New Issue