diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 2019-04-22 19:13:39 +0200 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 2019-04-22 20:10:49 +0200 |
commit | 266a8f61a5fe151a9718feebdbb0b3d74465f6e2 (patch) | |
tree | 602117c0dc2246ee0d8ba0ea6b29f63f45d51022 | |
parent | a72245949a88b631c97e39fec70313f855e21ec2 (diff) | |
download | 8sync-266a8f61a5fe151a9718feebdbb0b3d74465f6e2.tar.gz |
websocket: frame: Insert blocking put-bytevector hack.wip-bug
HACK: Do not suspend writes to avoid
`The connection to ws://localhost:1236/ was interrupted while the page was loading.' (icecat)`
`could not decode a text frame as utf-8' (ungoogled chromium)
* 8sync/systems/websocket/frame.scm: Use blocking write for
put-bytevector.
bug
-rw-r--r-- | 8sync/systems/websocket/frame.scm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/8sync/systems/websocket/frame.scm b/8sync/systems/websocket/frame.scm index 7a71dba..da55b90 100644 --- a/8sync/systems/websocket/frame.scm +++ b/8sync/systems/websocket/frame.scm @@ -327,6 +327,14 @@ MASKING-KEY." ;;; Frame writer ;;; +;; HACK: Do not suspend writes to avoid +;; `The connection to ws://localhost:1236/ was interrupted while the page was loading.' (icecat) +;; `could not decode a text frame as utf-8' (ungoogled chromium) +(define put-bytevector (@ (ice-9 binary-ports) put-bytevector)) + +;; This has no effect. +;; (define put-u8 (@ (ice-9 binary-ports) put-u8)) + (define* (write-frame frame #:optional (port (current-output-port))) ;; Packs an unsigned integer into a bytevector in network byte ;; order. |