Skip to content

Commit

Permalink
R: fix recent mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Jan 11, 2024
1 parent 3119108 commit 4d4ad68
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions r/R/port4me.R
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,11 @@ port4me <- function(tool = NULL, user = NULL, prepend = NULL, include = NULL, ex
}

## Subset of ports to draw from
min <- 1024L
max <- 65535L
if (length(include) > 0 || length(exclude) > 0) {
if (length(exclude) > 0 && length(include) == 0) {
include <- 1024:65535 ## default
include <- min:max ## default
}
subset <- unique(setdiff(include, exclude))
} else {
Expand All @@ -234,7 +236,7 @@ port4me <- function(tool = NULL, user = NULL, prepend = NULL, include = NULL, ex
port <- prepend[1]
prepend <- prepend[-1]
} else {
port <- lcg_port(min = port4me_include_min, subset = subset)
port <- lcg_port(min = min, max = max, subset = subset)
}
tries <- tries + 1L
count <- count + 1L
Expand Down

0 comments on commit 4d4ad68

Please sign in to comment.