Index: net/base/file_stream_win.cc |
diff --git a/net/base/file_stream_win.cc b/net/base/file_stream_win.cc |
index 234ddf93f6f4a659d4fe9c194a82a6589752fac1..62461ed51da316b8dffd68af39503a34e78eb69d 100644 |
--- a/net/base/file_stream_win.cc |
+++ b/net/base/file_stream_win.cc |
@@ -10,6 +10,7 @@ |
#include "base/histogram.h" |
#include "base/logging.h" |
#include "base/message_loop.h" |
+#include "base/win_util.h" |
#include "net/base/net_errors.h" |
namespace net { |
@@ -147,7 +148,13 @@ void FileStream::Close() { |
async_context_.reset(); |
if (file_ != INVALID_HANDLE_VALUE) { |
- CloseHandle(file_); |
+ if (!CloseHandle(file_)) { |
+ DLOG(WARNING) << " Unable to close file with handle = " |
+ << file_ << ", due to error " |
+ << GetLastError() << " (" |
+ << win_util::FormatMessage(GetLastError()) |
+ << ")"; |
+ } |
file_ = INVALID_HANDLE_VALUE; |
} |
} |