CAPAUT-254 Add udp tests and node mock

This commit is contained in:
marcboehm committed 2022-07-28 21:28:25 +02:00
1 parent 110f7a9ad8
commit 1114518ff3
3 files changed
+46 -5

No files matched your search

+2 -2
View File
@@ -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()
}
})
})
}
/**