Skip to content

Commit 36a307e

Browse files
committed
Sleep only 10ms
1 parent 245cb86 commit 36a307e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Platforms/emscripten/streams.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ function handleEAGAIN(cb) {
5656
} catch (e) {
5757
if (e && e.code === "EAGAIN") {
5858
// Presumably this means we're in node and tried to read from/write to
59-
// an O_NONBLOCK file descriptor. Synchronously sleep for 100ms as
60-
// requested by EAGAIN and try again. In case for some reason we fail to
61-
// sleep, propagate the error (it will turn into an EOFError).
62-
if (syncSleep(100)) {
59+
// an O_NONBLOCK file descriptor. Synchronously sleep for 10ms then try
60+
// again. In case for some reason we fail to sleep, propagate the error
61+
// (it will turn into an EOFError).
62+
if (syncSleep(10)) {
6363
continue;
6464
}
6565
}

0 commit comments

Comments
 (0)