Rev 1601 | Rev 1627 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 1601 | Rev 1606 | ||
|---|---|---|---|
| Line 54... | Line 54... | ||
| 54 | this->state_ = state; |
54 | this->state_ = state; |
| 55 | } |
55 | } |
| 56 | 56 | ||
| 57 | bool Node::CheckTimeout() |
57 | bool Node::CheckTimeout() |
| 58 | { |
58 | { |
| - | 59 | if (this->state_ == STATE_OFFLINE) |
|
| - | 60 | { |
|
| - | 61 | return true; |
|
| - | 62 | } |
|
| - | 63 | ||
| 59 | if (this->last_active_ + 10 < time(NULL)) |
64 | if (this->last_active_ + 10 < time(NULL)) |
| 60 | { |
65 | { |
| 61 | this->state_ = STATE_OFFLINE; |
66 | this->state_ = STATE_OFFLINE; |
| 62 | return false; |
67 | return false; |
| 63 | } |
68 | } |