Commit 6a0dc72bea8467f2557e5736ae2cd390764768cf
1 parent
9d52f229
Exists in
master
fix a bug
Showing
3 changed files
with
5 additions
and
5 deletions
Show diff stats
build.gradle
src/main/java/com/taover/heartbeat/bean/ReformInstance.java
| ... | ... | @@ -46,7 +46,7 @@ public class ReformInstance { |
| 46 | 46 | } |
| 47 | 47 | try { |
| 48 | 48 | for(String weixinWxid: this.weixinWxidList) { |
| 49 | - if(weixinWxid == null || weixinWxid.trim().equals("")) { | |
| 49 | + if(weixinWxid != null && !weixinWxid.trim().equals("")) { | |
| 50 | 50 | UtilWeixinMsg.sendTextMessage(weixinWxid, weixinContent); |
| 51 | 51 | } |
| 52 | 52 | } | ... | ... |
src/main/java/com/taover/heartbeat/bean/ServerInstance.java
| ... | ... | @@ -12,10 +12,10 @@ public class ServerInstance implements Instance { |
| 12 | 12 | private String url; |
| 13 | 13 | private int fixRateSec; |
| 14 | 14 | private int maxWaitSec; |
| 15 | - private long latestRequestUnixtime; | |
| 15 | + private long latestRequestUnixtime = -1; | |
| 16 | 16 | private ServerResponse latestServerResponse; |
| 17 | - private int errorServerResponseCount; | |
| 18 | - private boolean isIncrErrorServerResponseCount; | |
| 17 | + private int errorServerResponseCount = 0; | |
| 18 | + private boolean isIncrErrorServerResponseCount = false; | |
| 19 | 19 | |
| 20 | 20 | public ServerInstance(String code, String url, int fixRateSec, int maxWaitSec) throws Exception { |
| 21 | 21 | super(); | ... | ... |