summaryrefslogtreecommitdiff
path: root/op_crates/websocket/01_websocket.js
diff options
context:
space:
mode:
authorLiam Murphy <43807659+Liamolucko@users.noreply.github.com>2021-04-20 00:57:02 +1000
committerGitHub <noreply@github.com>2021-04-19 16:57:02 +0200
commit4786e1d92dcbdcbe743c5e2be0878c3c4f68e781 (patch)
tree54dfcfd0b9eab77f45f015e9113b21e2a4884f3e /op_crates/websocket/01_websocket.js
parent776a999eab2b04385ccd2c80cdce365feec20e05 (diff)
fix(runtime): handle race condition in postMessage where worker has terminated (#10239)
The panic was caused by the lack of an error class mapping for futures::channel::TrySendError, but it shouldn't have been throwing an error in the first place - when a worker has terminated, postMessage should just return. The issue was that the termination message hadn't yet been recieved, so it was carrying on with trying to send the message. This adds another check on the Rust side for if the channel is closed, and if it is the worker is treated as terminated.
Diffstat (limited to 'op_crates/websocket/01_websocket.js')
0 files changed, 0 insertions, 0 deletions