diff options
Diffstat (limited to 'daemon/Monitor.cpp')
-rw-r--r-- | daemon/Monitor.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/daemon/Monitor.cpp b/daemon/Monitor.cpp index 90d5c47..b34a15f 100644 --- a/daemon/Monitor.cpp +++ b/daemon/Monitor.cpp | |||
@@ -18,8 +18,15 @@ Monitor::Monitor() : mFd(-1) { | |||
18 | } | 18 | } |
19 | 19 | ||
20 | Monitor::~Monitor() { | 20 | Monitor::~Monitor() { |
21 | if (mFd >= -1) { | 21 | if (mFd >= 0) { |
22 | close(mFd); | 22 | ::close(mFd); |
23 | } | ||
24 | } | ||
25 | |||
26 | void Monitor::close() { | ||
27 | if (mFd >= 0) { | ||
28 | ::close(mFd); | ||
29 | mFd = -1; | ||
23 | } | 30 | } |
24 | } | 31 | } |
25 | 32 | ||