summaryrefslogtreecommitdiff
path: root/js/dispatch.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/dispatch.ts')
-rw-r--r--js/dispatch.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/js/dispatch.ts b/js/dispatch.ts
index 1a8b4d2e0..d416264bd 100644
--- a/js/dispatch.ts
+++ b/js/dispatch.ts
@@ -1,6 +1,6 @@
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
import { libdeno } from "./libdeno";
-import { flatbuffers } from "flatbuffers";
+import * as flatbuffers from "./flatbuffers";
import * as msg from "gen/msg_generated";
import * as errors from "./errors";
import * as util from "./util";
@@ -86,6 +86,7 @@ function sendInternal(
msg.Base.addSync(builder, sync);
msg.Base.addCmdId(builder, cmdId);
builder.finish(msg.Base.endBase(builder));
-
- return [cmdId, libdeno.send(builder.asUint8Array(), data)];
+ const res = libdeno.send(builder.asUint8Array(), data);
+ builder.inUse = false;
+ return [cmdId, res];
}