From f37ee5bd4db3dc8951278c3e2842679da9fe4af4 Mon Sep 17 00:00:00 2001 From: John Sully Date: Sat, 30 May 2020 01:14:53 -0400 Subject: [PATCH] TLS requires we explicitly marshal connected sockets when using them on a different thread Former-commit-id: 341a8caef959883ca6fc71f81f8a3fed747b2341 --- src/cluster.cpp | 1 + src/tls.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/src/cluster.cpp b/src/cluster.cpp index 1ebaed262..15c030162 100644 --- a/src/cluster.cpp +++ b/src/cluster.cpp @@ -5272,6 +5272,7 @@ try_again: zfree(ov); zfree(kv); return; /* error sent to the client by migrateGetSocket() */ } + connMarshalThread(cs->conn); rioInitWithBuffer(&cmd,sdsempty()); diff --git a/src/tls.cpp b/src/tls.cpp index 0f59fb3bd..4284a27bf 100644 --- a/src/tls.cpp +++ b/src/tls.cpp @@ -349,6 +349,7 @@ connection *connCreateTLS(void) { void connTLSMarshalThread(connection *c) { tls_connection *conn = (tls_connection*)c; + serverAssert(conn->pending_list_node == nullptr); conn->el = serverTL->el; }