radareorg / radare2-r2pipe

Access radare2 via pipe from any programming language!
388 stars 99 forks source link

r2pipe-promise hangs #103

Closed radare closed 7 months ago

radare commented 5 years ago

this is in nodejs/r2pipe-promise/test-hang-bug.js

const r2pipePromise = require('r2pipe-promise');
const r2pipe = require('r2pipe');

// Async hangs
async function test () {
  const r2 = await r2pipePromise.open();
  const msg = await r2.cmd('?E hello');
  console.log(msg);
  await r2.quit();
}

async function testSync () {
  const r2 = r2pipe.openSync();
  const msg = r2.cmd('?E hello');
  console.log(msg);
  r2.quit();
}

// hangs
test().then(console.log).catch(console.error);
// works
//testSync().then(console.log).catch(console.error);
bare().then(console.log).catch(console.error);
trufae commented 7 months ago

closing, its being rewritten in typescript on a clean codebase