Calling connect() on an instance of ElectrumClient exits when host is reachable but port isn't being listened to
Calling connect() on an instance of ElectrumClient causes entire program to exit with code 0, regardless of if the event loop is still populated when the host that's passed is reachable but there isn't anything listening on the port. See code example below:
const { ElectrumClient } = require('electrum-cash');
async function run() {
const electrum = new ElectrumClient('Electrum client example', '1.4.1', 'electrum.imaginary.cash', 100);
await electrum.connect();
console.log("This code doesn't execute");
}
run();
I haven't been able to track down what's causing this behaviour yet.