Skip to content

Commit

Permalink
event of response fix#3244 (#3247)
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyHZM authored and beiwei30 committed Feb 2, 2019
1 parent e692d8a commit 1ecf2dd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,10 @@ public void setEvent(String event) {
mResult = event;
}

public void setEvent(boolean mEvent) {
this.mEvent = mEvent;
}

public boolean isHeartbeat() {
return mEvent && HEARTBEAT_EVENT == mResult;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
// decode response.
Response res = new Response(id);
if ((flag & FLAG_EVENT) != 0) {
res.setEvent(Response.HEARTBEAT_EVENT);
res.setEvent(true);
}
// get status.
byte status = header[3];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
// decode response.
Response res = new Response(id);
if ((flag & FLAG_EVENT) != 0) {
res.setEvent(Response.HEARTBEAT_EVENT);
res.setEvent(true);
}
// get status.
byte status = header[3];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
// decode response.
Response res = new Response(id);
if ((flag & FLAG_EVENT) != 0) {
res.setEvent(Response.HEARTBEAT_EVENT);
res.setEvent(true);
}
// get status.
byte status = header[3];
Expand Down

0 comments on commit 1ecf2dd

Please sign in to comment.