]> xenbits.xensource.com Git - pvdrivers/win/xencons.git/commitdiff
Flush and Disconnect pipe clients
authorOwen Smith <owen.smith@citrix.com>
Tue, 29 Aug 2017 11:03:22 +0000 (12:03 +0100)
committerPaul Durrant <paul.durrant@citrix.com>
Tue, 29 Aug 2017 11:03:22 +0000 (12:03 +0100)
Named pipes should be flushed and disconnected before closed.

Signed-off-by: Owen Smith <owen.smith@citrix.com>
src/monitor/monitor.c

index 9cfec9ddddb44797937bedf6e7d7cf132f72f745..89f5f5668c4c547e198b9ac397664d993476571a 100644 (file)
@@ -491,6 +491,8 @@ PipeThread(
 
     CloseHandle(Overlapped.hEvent);
 
+    FlushFileBuffers(Pipe->Pipe);
+    DisconnectNamedPipe(Pipe->Pipe);
     CloseHandle(Pipe->Pipe);
     CloseHandle(Pipe->Thread);
     free(Pipe);