|
@@ -920,8 +920,10 @@ class SocketDevice(Device): |
|
|
Closes the device. |
|
|
Closes the device. |
|
|
""" |
|
|
""" |
|
|
try: |
|
|
try: |
|
|
|
|
|
# TODO: Find a way to speed up this shutdown. |
|
|
if self.ssl: |
|
|
if self.ssl: |
|
|
self._device.shutdown() |
|
|
self._device.shutdown() |
|
|
|
|
|
|
|
|
else: |
|
|
else: |
|
|
self._device.shutdown(socket.SHUT_RDWR) # Make sure that it closes immediately. |
|
|
self._device.shutdown(socket.SHUT_RDWR) # Make sure that it closes immediately. |
|
|
|
|
|
|
|
|