Skip to content

Commit 423cf16

Browse files
committed
fix messenger connections over tcp
1 parent a0c143e commit 423cf16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

R/messenger.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ messenger <- function(url) {
4444
}
4545
cat(sprintf("\n| url: %s\n", url), file = stdout())
4646
cat("| connecting... ", file = stderr())
47-
s <- .Call(rnng_send, sock, writeBin(":c ", raw()), 2000L)
47+
s <- .Call(rnng_send, sock, writeBin(":c ", raw()), 1000L)
4848
if (is.integer(s)) {
4949
cat(sprintf("\r| peer offline: %s\n", format.POSIXct(Sys.time())), file = stderr())
5050
} else {

src/sockets.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ SEXP rnng_messenger(SEXP url) {
161161
}
162162
dlp = R_Calloc(1, nng_listener);
163163
xc = nng_listen(*sock, up, dlp, 0);
164-
if (xc == 10) {
164+
if (xc == 10 || xc == 15) {
165165
R_Free(dlp);
166166
nng_dialer *dlp = R_Calloc(1, nng_dialer);
167167
xc = nng_dial(*sock, up, dlp, 2u);

0 commit comments

Comments
 (0)