Tidy up
This commit is contained in:
parent
e14082795c
commit
b72fb6c309
|
@ -16,10 +16,7 @@ const socket = net.createConnection({ port: 5999, host: 'localhost' }, () => {
|
||||||
socket.on('close', () => t.freshen(t => t.quit()));
|
socket.on('close', () => t.freshen(t => t.quit()));
|
||||||
socket.on('end', () => t.freshen(t => t.quit()));
|
socket.on('end', () => t.freshen(t => t.quit()));
|
||||||
socket.on('data', data => r.accept(data));
|
socket.on('data', data => r.accept(data));
|
||||||
t.actor.atExit(() => {
|
t.actor.atExit(() => socket.destroy());
|
||||||
console.log('closing socket');
|
|
||||||
socket.destroy();
|
|
||||||
});
|
|
||||||
shutdownRef = t.ref({
|
shutdownRef = t.ref({
|
||||||
retract(t) { t.quit(); }
|
retract(t) { t.quit(); }
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue