mirror of
https://github.com/openvswitch/ovs
synced 2025-10-19 14:37:21 +00:00
python windows: Allow clients to read from server before disconnect.
Wait for clients to read from the pipe before disconnecting the server. Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
This commit is contained in:
committed by
Gurucharan Shetty
parent
67fd906054
commit
09e192cd15
@@ -233,6 +233,9 @@ class Stream(object):
|
||||
self.socket.close()
|
||||
if self.pipe is not None:
|
||||
if self._server:
|
||||
# Flush the pipe to allow the client to read the pipe
|
||||
# before disconnecting.
|
||||
win32pipe.FlushFileBuffers(self.pipe)
|
||||
win32pipe.DisconnectNamedPipe(self.pipe)
|
||||
winutils.close_handle(self.pipe, vlog.warn)
|
||||
winutils.close_handle(self._read.hEvent, vlog.warn)
|
||||
|
Reference in New Issue
Block a user