wait for socket until everything has been sent
Closed this issue · 0 comments
impacmp commented
Hi,
please have a look at the following code:
run();
async function run() {
//..... doing some async / await stuff here .....//
const sdc = new SDC({ host: appConfig.statsdHost, prefix: `test` });
sdc.increment("testcounter", 1);
sdc.close();
process.exit();
};
This will cause that stats will not be sent to the server. Is there any way to await for the socket until everything is done?