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