mirror of
https://github.com/rwinkhart/go-winio.git
synced 2026-09-01 22:57:35 -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:
@@ -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