CAPAUT-254 Add udp tests and node mock
This commit is contained in:
@@ -48,13 +48,13 @@ module.exports = function(RED) {
|
||||
const address = udpServer.address()
|
||||
node.status({ fill: 'green', shape: 'dot', text: `Server is listening: ${address.address}:${address.port}` })
|
||||
})
|
||||
udpServer.bind(config.listenPort || PARADIGMA_UDP_PORT_DEFAULT)
|
||||
udpServer.bind(config.listenPort || PARADIGMA_UDP_PORT_DEFAULT)
|
||||
// Cleanup hooks
|
||||
node.on('close', () => {
|
||||
if ( udpServer ) {
|
||||
udpServer.close()
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user