CAPAUT-254 Add udp tests and node mock
This commit is contained in:
1 parent
110f7a9ad8
commit
1114518ff3
3 files changed
+46
-5
No files matched your search
@@ -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