diff --git a/R/dispatcher.R b/R/dispatcher.R index 61317d6f..ef8d7759 100644 --- a/R/dispatcher.R +++ b/R/dispatcher.R @@ -201,6 +201,11 @@ dispatcher <- function(host, url = NULL, n = NULL, ..., tls = NULL, pass = NULL, value <- .subset2(res, "value") id <- as.character(.subset2(res, "aio")) res <- recv_aio(psock, mode = 8L, cv = cv) + if (outq[[id]][["msgid"]] < 0) { + outq[[id]][["msgid"]] <- 0L + nanonext::cv_signal(cv) + next + } send(outq[[id]][["ctx"]], value, mode = 2L, block = TRUE) outq[[id]][["msgid"]] <- 0L }