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:
Robby Findler 2014-05-20 17:17:12 -05:00
parent 23d5cf568e
commit 4db7477b0d

View File

@ -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)