mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-10-27 05:29:58 -04:00
Flush file buffers on CloseWrite
This forces any pending data to be sent to the remote party before emitting the 0-length EOF message, to make sure it appears as a seperate message. This fixes the "TestEchoWithMessaging" test Signed-off-by: Simon Ferquel <simon.ferquel@docker.com>
This commit is contained in:
1 parent
203d18a858
commit
7c7d6b461c
2 files changed
+9
-1
No files matched your search
@@ -219,3 +219,7 @@ func (f *win32File) SetWriteDeadline(t time.Time) error {
|
||||
f.writeDeadline = t
|
||||
return nil
|
||||
}
|
||||
|
||||
func (f *win32File) Flush() error {
|
||||
return syscall.FlushFileBuffers(f.handle)
|
||||
}
|
||||
Reference in new issue
Block a user