Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protosubff : heartbeat data is null causes connect close #4645

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ protected Object decodeBody(Channel channel, InputStream is, byte[] header) thro
if (status == Response.OK) {
Object data;
if (res.isHeartbeat()) {
data = decodeHeartbeatData(channel, in);
// data = decodeHeartbeatData(channel, in);
chenyu2016 marked this conversation as resolved.
Show resolved Hide resolved
data = null;
} else if (res.isEvent()) {
data = decodeEventData(channel, in);
} else {
Expand Down Expand Up @@ -378,7 +379,11 @@ protected void encodeData(ObjectOutput out, Object data) throws IOException {
}

private void encodeEventData(ObjectOutput out, Object data) throws IOException {
out.writeObject(data);
if(data != null) {
out.writeObject(data);
chenyu2016 marked this conversation as resolved.
Show resolved Hide resolved
}else{
logger.warn("encodeEventData data is null");
}
}

@Deprecated
Expand Down