Fix a very old race condition in this test.

Probably exposed by the rktio changes.
This commit is contained in:
Sam Tobin-Hochstadt 2017-06-26 17:56:23 -04:00
parent 76711dfb50
commit f9a39531e9
2 changed files with 4 additions and 2 deletions

View File

@ -6,8 +6,9 @@
(define n 10)
(define (server)
(define l (tcp-listen PORT 5 #t))
(thread client)
(let-values ([(in out) (tcp-accept (tcp-listen PORT 5 #t))]
(let-values ([(in out) (tcp-accept l)]
[(buffer) (make-string (string-length DATA))])
(file-stream-buffer-mode out 'none)
(let loop ([i (read-string! buffer in)]

View File

@ -7,8 +7,9 @@
(: server ( -> Void))
(define (server)
(define l (tcp-listen PORT 5 #t))
(thread client)
(let-values ([(in out) (tcp-accept (tcp-listen PORT 5 #t))]
(let-values ([(in out) (tcp-accept l)]
[(buffer) (make-string (string-length DATA))])
(file-stream-buffer-mode out 'none)
(let: loop : Void ([i : (U Integer EOF) (read-string! buffer in)]