Index: chromeos/dbus/debug_daemon_client.cc |
=================================================================== |
--- chromeos/dbus/debug_daemon_client.cc (revision 145483) |
+++ chromeos/dbus/debug_daemon_client.cc (working copy) |
@@ -51,9 +51,12 @@ |
} |
virtual ~PipeReader() { |
- if (pipe_fd_[0] != -1) |
- if (HANDLE_EINTR(close(pipe_fd_[0])) < 0) |
+ if (pipe_fd_[0] != -1) { |
+ if (data_stream_.get()) |
+ data_stream_->CloseAndCancelAsync(); |
+ else if (HANDLE_EINTR(close(pipe_fd_[0])) < 0) |
PLOG(ERROR) << "close[0]"; |
+ } |
if (pipe_fd_[1] != -1) |
if (HANDLE_EINTR(close(pipe_fd_[1])) < 0) |
PLOG(ERROR) << "close[1]"; |