mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-02 14:15:46 +00:00
iostream: make close() flush
This change is intended to make close() flush the stream before proceeding with the close itself. This improves the situation where we have to guarantee that the stream is flushed before closing it. Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
This commit is contained in:
committed by
Avi Kivity
parent
061de14d01
commit
36701cafcb
@@ -173,7 +173,7 @@ public:
|
||||
future<> write(net::packet p);
|
||||
future<> write(scattered_message<char_type> msg);
|
||||
future<> flush();
|
||||
future<> close() { return _fd.close(); }
|
||||
future<> close() { return flush().then([this] { return _fd.close(); }); }
|
||||
private:
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user