When going over range from port_min to port_max to find open
port to bind we can increase port_min after successful bind so the
next portal will start looking from the next port.
Signed-off-by: Roi Dayan <roid@mellanox.com>
// try ports within the configured range
for (; port_min <= port_max; port_min++) {
r = portals[i]->bind(ops, base_uri, port_min, &result_port);
- if (r == 0)
+ if (r == 0) {
+ port_min++;
break;
+ }
}
if (r != 0) {
lderr(msgr->cct) << "portal.bind unable to bind to " << base_uri