Skip to content

Commit cbe09e2

Browse files
author
Brett Hazen
committed
Update socket.close() to work with OpenSSL
1 parent bc0fc79 commit cbe09e2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

riak/transports/pbc/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,10 @@ def close(self):
193193
Closes the underlying socket of the PB connection.
194194
"""
195195
if self._socket:
196-
self._socket.shutdown(socket.SHUT_RDWR)
196+
if self._client._credentials:
197+
self._socket.shutdown()
198+
else:
199+
self._socket.shutdown(socket.SHUT_RDWR)
197200

198201
def _parse_msg(self, code, packet):
199202
try:

0 commit comments

Comments
 (0)