fix timeout computation in the REPL io
In the case that the flush queue was empty, the first byte that comes it would appear to have come from a long time ago and thus get flushed immediately. Instead, when the first byte comes in, we restart the timer at that point, intead of holding the old value
This commit is contained in:
parent
23d5cf568e
commit
4db7477b0d
|
@ -2641,7 +2641,10 @@
|
|||
[((at-queue-size text-to-insert) . < . output-buffer-full)
|
||||
(when return-chan
|
||||
(channel-put return-chan '()))
|
||||
(loop new-text-to-insert last-flush)]
|
||||
(loop new-text-to-insert
|
||||
(if (at-queue-empty? text-to-insert)
|
||||
(current-inexact-milliseconds)
|
||||
last-flush))]
|
||||
[else
|
||||
(let ([chan (make-channel)])
|
||||
(let-values ([(viable-bytes remaining-queue)
|
||||
|
|
Loading…
Reference in New Issue
Block a user