Skip to content

Commit 2ea3936

Browse files
committed
Fix range check
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent d526f07 commit 2ea3936

File tree

1 file changed

+1
-1
lines changed
  • testnet/stacks-node/src/tests

1 file changed

+1
-1
lines changed

testnet/stacks-node/src/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ pub fn gen_random_port() -> u16 {
116116
loop {
117117
// Note it needs to be +1 because we reserve one port for the event observer
118118
assert!(
119-
USED_PORTS.lock().unwrap().len() + 1 < range_len,
119+
USED_PORTS.lock().unwrap().len() < range_len,
120120
"No more available ports"
121121
);
122122
let port = rng.gen_range(1024..u16::MAX); // use a non-privileged port between 1024 and 65534

0 commit comments

Comments
 (0)