aboutsummaryrefslogtreecommitdiffstats
path: root/lib/erl_interface
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2018-06-28 17:08:56 +0200
committerErlang/OTP <[email protected]>2018-06-28 17:08:56 +0200
commit0f59518fcbaf1d6ea0d7f9df243c48937f0d06af (patch)
tree220055d00c6367bb0c8168cb07e3521503aa8167 /lib/erl_interface
parent0c77843558fd4e4fbd88b5ff2d4f3a359f793f3f (diff)
parent60bef434c1e0776443887e06df44b59008a76df8 (diff)
downloadotp-0f59518fcbaf1d6ea0d7f9df243c48937f0d06af.tar.gz
otp-0f59518fcbaf1d6ea0d7f9df243c48937f0d06af.tar.bz2
otp-0f59518fcbaf1d6ea0d7f9df243c48937f0d06af.zip
Merge branch 'sverker/erl_interface/simultaneous-connect/OTP-15161' into maint-20
* sverker/erl_interface/simultaneous-connect/OTP-15161: erl_interface: Fix simultaneous connection setup
Diffstat (limited to 'lib/erl_interface')
-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: