Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
comm.on_msg((msg) => {
put_buffers(msg.content.data.state, msg.content.data.buffer_paths, msg.buffers);
// A suspected response was received, check to see if
// it's a state update. If so, resolve.
if (msg.content.data.method === 'update') {
resolve({
comm: comm,
msg: msg
});
}
});
});
comm.on_msg(function (msg) {
base.put_buffers(msg.content.data.state, msg.content.data.buffer_paths, msg.buffers);
// A suspected response was received, check to see if
// it's a state update. If so, resolve.
if (msg.content.data.method === 'update') {
resolve({
comm: comm,
msg: msg
});
}
});
});
comm.on_msg(async (msg) => {
base.put_buffers(msg.content.data.state, msg.content.data.buffer_paths, msg.buffers);
if (msg.content.data.method === 'update') {
resolve({comm: comm, msg: msg});
}
});
comm.send({method: 'request_state'}, {});