aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-06-19 15:48:09 +0200
committerSverker Eriksson <[email protected]>2018-06-19 15:48:09 +0200
commit60bef434c1e0776443887e06df44b59008a76df8 (patch)
tree07292fb2b60637a50d2104d9f198b15d25f3dc20 /lib
parentf2c1d537dc28ffbde5d42aedec70bf4c6574c3ea (diff)
downloadotp-60bef434c1e0776443887e06df44b59008a76df8.tar.gz
otp-60bef434c1e0776443887e06df44b59008a76df8.tar.bz2
otp-60bef434c1e0776443887e06df44b59008a76df8.zip
erl_interface: Fix simultaneous connection setup
by also accepting status "ok_simultaneous".
Diffstat (limited to 'lib')
-rw-r--r--lib/erl_interface/src/connect/ei_connect.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c
index 5c01223e3d..be228ab853 100644
--- a/lib/erl_interface/src/connect/ei_connect.c
+++ b/lib/erl_interface/src/connect/ei_connect.c
@@ -1357,11 +1357,14 @@ static int recv_status(int fd, unsigned ms)
"<- RECV_STATUS socket read failed (%d)", rlen);
goto error;
}
- if (rlen == 3 && buf[0] == 's' && buf[1] == 'o' &&
- buf[2] == 'k') {
+
+ EI_TRACE_CONN2("recv_status",
+ "<- RECV_STATUS (%.*s)", (rlen>20 ? 20 : rlen), buf);
+
+ if (rlen >= 3 && buf[0] == 's' && buf[1] == 'o' && buf[2] == 'k') {
+ /* Expecting "sok" or "sok_simultaneous" */
if (!is_static)
free(buf);
- EI_TRACE_CONN0("recv_status","<- RECV_STATUS (ok)");
return 0;
}
error: