You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "beiwei30 (GitHub)" <gi...@apache.org> on 2019/01/07 03:19:09 UTC
[GitHub] [incubator-dubbo] beiwei30 commented on issue #3043: wrong
event setting
@CrazyHZM, would you mind to take a look at my comment? I think the root cause is
```java
if ((flag & FLAG_EVENT) != 0) {
res.setEvent(Response.HEARTBEAT_EVENT);
}
```
once we change it to
```java
if ((flag & FLAG_EVENT) != 0) {
res.setEvent(true);
}
```
then we should not need the following logic any longer:
```java
if (!req.isBroken()) {
if ((flag & FLAG_EVENT) != 0) {
if (data != null && data.equals(Request.READONLY_EVENT)) {
req.setEvent(Request.READONLY_EVENT);
} else {
req.setEvent(Request.HEARTBEAT_EVENT);
}
}
req.setData(data);
} else {
if ((flag & FLAG_EVENT) != 0) {
req.setEvent(true);
}
}
```
And, in your change, you consider request only, pls. take care response too.
[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3043 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org