diff options
-rw-r--r-- | gnunet-build/packages/gnunet/gnunet/files/network.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gnunet-build/packages/gnunet/gnunet/files/network.js b/gnunet-build/packages/gnunet/gnunet/files/network.js index 011ec8f..d33fdda 100644 --- a/gnunet-build/packages/gnunet/gnunet/files/network.js +++ b/gnunet-build/packages/gnunet/gnunet/files/network.js @@ -90,9 +90,10 @@ mergeInto(LibraryManager.library, { ___setErrNo(ERRNO_CODES.ENOTCONN); return -1; } - var view = {{{ makeHEAPView('U8', 'buffer', 'buffer+length') }}}; + var view = + new Uint8Array({{{ makeHEAPView('U8', 'buffer', 'buffer+length') }}}); try { - SOCKETS[desc].port.postMessage(new Uint8Array(view)); + SOCKETS[desc].port.postMessage(new Uint8Array(view, [view])); } catch (e) { console.error("Failed to send"); ___setErrNo(ERRNO_CODES.ECONNRESET); |