Skip to content

Commit 1ba925b

Browse files
author
yiqf
committed
[ISSUE #4236] TCP reconnection failed
1 parent 8ad08ba commit 1ba925b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPPubClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import io.cloudevents.core.format.EventFormat;
3838
import io.cloudevents.core.provider.EventFormatProvider;
3939
import io.cloudevents.jackson.JsonFormat;
40+
import io.netty.channel.ChannelHandler.Sharable;
4041
import io.netty.channel.ChannelHandlerContext;
4142

4243
import com.google.common.base.Preconditions;
@@ -138,6 +139,7 @@ public void close() {
138139
}
139140
}
140141

142+
@Sharable
141143
private class CloudEventTCPPubHandler extends AbstractEventMeshTCPPubHandler<CloudEvent> {
142144

143145
public CloudEventTCPPubHandler(ConcurrentHashMap<Object, RequestContext> contexts) {

eventmesh-sdks/eventmesh-sdk-java/src/main/java/org/apache/eventmesh/client/tcp/impl/cloudevent/CloudEventTCPSubClient.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import io.cloudevents.core.format.EventFormat;
4545
import io.cloudevents.core.provider.EventFormatProvider;
4646
import io.cloudevents.jackson.JsonFormat;
47+
import io.netty.channel.ChannelHandler.Sharable;
4748
import io.netty.channel.ChannelHandlerContext;
4849

4950
import com.google.common.base.Preconditions;
@@ -141,6 +142,7 @@ public void close() {
141142
}
142143
}
143144

145+
@Sharable
144146
private class CloudEventTCPSubHandler extends AbstractEventMeshTCPSubHandler<CloudEvent> {
145147

146148
public CloudEventTCPSubHandler(

0 commit comments

Comments
 (0)