Check colision for tunnelPort
tiagostutz opened this issue · comments
Currently, the tunnelPort
attribute is just being assigned by a Math.random()
function withou checking collision and not considering the provided port range by the environment var TUNNEL_PORT_RANGE
. As this can lead to port collision, there are 2 things to be done:
-
Guarantee that the port is within the
TUNNEL_PORT_RANGE
-
Guarantee that the port is not being already used by other machines. To do so, you can check the registered_machine collection that has registered the machineId and the respective tunnelPort
@tiagostutz , can i take this issue? =]