Fix cancellable streams on Windows clients + HTTPS transport

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2018-05-24 17:21:17 -07:00 committed by Joffrey F
parent 95ad903c35
commit 40711cb501
1 changed files with 2 additions and 0 deletions

View File

@ -57,6 +57,8 @@ class CancellableStream(object):
else:
sock = sock_fp._sock
if isinstance(sock, urllib3.contrib.pyopenssl.WrappedSocket):
sock = sock.socket
sock.shutdown(socket.SHUT_RDWR)
sock.close()