Skip to content

Commit

Permalink
Bump WebSocket max message size to 256 MiB
Browse files Browse the repository at this point in the history
WebSocket has a default limit for message size of 32 MiB. This is not enough when processing long documents with large images, especially given the overhead of using base64 encoding. Thankfully, the WebSocket constructor has a maxMessageSize argument to specify arbitrary values.
  • Loading branch information
lunar-debian authored Aug 1, 2020
1 parent c5ff537 commit e39aacb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/chrome.R
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ chrome_print = function(

with_temp_loop_maybe({

ws = websocket::WebSocket$new(get_entrypoint(debug_port, verbose), autoConnect = FALSE)
ws = websocket::WebSocket$new(get_entrypoint(debug_port, verbose), autoConnect = FALSE, maxMessageSize = 256 * 1024 * 1024)
ws$onClose(kill_chrome)
ws$onError(kill_chrome)
close_ws = function() {
Expand Down

0 comments on commit e39aacb

Please sign in to comment.