update relay

stable
Marcus 2020-11-11 21:47:54 -05:00
parent 184622d477
commit cc10219408
1 changed files with 17 additions and 14 deletions

View File

@ -5,18 +5,21 @@ const { config } = require('./../package.json');
title('relay');
let connection = null;
// let connection = null;
(function tryConnect() {
connection = net.createConnection(config.ports.ns, 'valnet.xyz', () => {
log.success('Connected to name server');
});
connection.on('error', () => {
log.error('Could not connect to name server')
connection = null;
tryConnect();
});
connection.on('data', (data) => {
log.debug(data.toString());
})
})();
// (function tryConnect() {
// connection = net.createConnection(config.ports.ns, 'valnet.xyz', () => {
// log.success('Connected to name server');
// });
// connection.on('error', () => {
// log.error('Could not connect to name server')
// connection = null;
// tryConnect();
// });
// connection.on('data', (data) => {
// log.debug(data.toString());
// })
// })();
setTimeout(() => {}, 1000)