From 70f01deebd6b8fef19ba48046e9eb2bc8cd449e0 Mon Sep 17 00:00:00 2001 From: shikokuchuo <53399081+shikokuchuo@users.noreply.github.com> Date: Mon, 21 Aug 2023 11:57:29 +0100 Subject: [PATCH] keep one revert two --- R/mirai.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/R/mirai.R b/R/mirai.R index 489c3ca59..5f8732f2f 100644 --- a/R/mirai.R +++ b/R/mirai.R @@ -750,7 +750,7 @@ daemons <- function(n, url = NULL, dispatcher = TRUE, tls = NULL, ..., .compute urlc <- strcat(urld, "c") sock <- req_socket(urld) sockc <- req_socket(urlc, resend = 0L) - launch_and_sync_daemon(sock = sock, synctime = dispatcher + is.logical(dispatcher) * .timelimit, urld, parse_dots(...), url, n, urlc, tls = tls) + launch_and_sync_daemon(sock = sock, synctime = if (is.numeric(dispatcher)) dispatcher else .timelimit, urld, parse_dots(...), url, n, urlc, tls = tls) init_monitor(sockc = sockc, envir = envir) } else { sock <- req_socket(url, tls = if (length(tls)) tls_config(server = tls)) @@ -785,7 +785,7 @@ daemons <- function(n, url = NULL, dispatcher = TRUE, tls = NULL, ..., .compute if (dispatcher) { urlc <- strcat(urld, "c") sockc <- req_socket(urlc, resend = 0L) - launch_and_sync_daemon(sock = sock, synctime = dispatcher + is.logical(dispatcher) * .timelimit, urld, dots, n, urlc) + launch_and_sync_daemon(sock = sock, synctime = if (is.numeric(dispatcher)) dispatcher else .timelimit, urld, dots, n, urlc) init_monitor(sockc = sockc, envir = envir) } else { for (i in seq_len(n))