Skip to content

Commit

Permalink
Fix nonblocking socket issues
Browse files Browse the repository at this point in the history
  • Loading branch information
moisesguimaraes committed Apr 3, 2020
1 parent 3f655dd commit 97f1431
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pymemcache/client/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,8 @@ def _connect(self):

if self.tls_context is not None and self.socket_module.AF_INET:
sock = self.tls_context.wrap_socket(
sock, server_hostname=self.server[0]
sock, server_hostname=self.server[0],
do_handshake_on_connect=False,
)
except Exception:
sock.close()
Expand Down
3 changes: 3 additions & 0 deletions pymemcache/test/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,9 @@ def _unicode_value_in_set():

@pytest.mark.integration()
def test_tls(client_class, tls_host, tls_port, socket_module, tls_context):
if six.PY2:
pass

client = client_class(
(tls_host, tls_port),
socket_module=socket_module,
Expand Down

0 comments on commit 97f1431

Please sign in to comment.