We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f5e19f commit b9576c1Copy full SHA for b9576c1
docker/transport/npipesocket.py
@@ -169,13 +169,16 @@ def setblocking(self, flag):
169
170
def settimeout(self, value):
171
if value is None:
172
- self._timeout = win32pipe.NMPWAIT_NOWAIT
+ # Blocking mode
173
+ self._timeout = win32pipe.NMPWAIT_WAIT_FOREVER
174
elif not isinstance(value, (float, int)) or value < 0:
175
raise ValueError('Timeout value out of range')
176
elif value == 0:
- self._timeout = win32pipe.NMPWAIT_USE_DEFAULT_WAIT
177
+ # Non-blocking mode
178
+ self._timeout = win32pipe.NMPWAIT_NO_WAIT
179
else:
- self._timeout = value
180
+ # Timeout mode - Value converted to milliseconds
181
+ self._timeout = value * 1000
182
183
def gettimeout(self):
184
return self._timeout
0 commit comments