Rev 971 | Rev 986 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 971 | Rev 974 | ||
|---|---|---|---|
| Line 40... | Line 40... | ||
| 40 | { |
40 | { |
| 41 | if (this.myIsOnline) |
41 | if (this.myIsOnline) |
| 42 | { |
42 | { |
| 43 | var date = new Date(); |
43 | var date = new Date(); |
| 44 | if (this.myHeartbeatTime + 10 < date.getTimestamp()) |
44 | if (this.myHeartbeatTime + 10 < date.getTimestamp()) |
| - | 45 | { |
|
| - | 46 | this.setOffline(); |
|
| - | 47 | } |
|
| - | 48 | } |
|
| - | 49 | } |
|
| - | 50 | ||
| - | 51 | CanService.prototype.setOffline = function() |
|
| - | 52 | { |
|
| - | 53 | if (this.myIsOnline) |
|
| 45 | { |
54 | { |
| 46 | log(this.myName + ":" + this.myId + "> Service went offline\n"); |
55 | log(this.myName + ":" + this.myId + "> Service went offline\n"); |
| 47 | this.myIsOnline = false; |
56 | this.myIsOnline = false; |
| 48 | this.callEvent("offline", null); |
57 | this.callEvent("offline", null); |
| 49 | } |
- | |
| 50 | } |
58 | } |
| 51 | } |
59 | } |
| 52 | 60 | ||
| 53 | CanService.prototype.isOnline = function() |
61 | CanService.prototype.isOnline = function() |
| 54 | { |
62 | { |