File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
spring-messaging/src/main/java/org/springframework/messaging/tcp/reactor Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change 17
17
package org .springframework .messaging .tcp .reactor ;
18
18
19
19
import io .netty .buffer .ByteBuf ;
20
+ import io .netty .channel .ChannelPipeline ;
20
21
import reactor .core .publisher .DirectProcessor ;
21
22
import reactor .core .publisher .Mono ;
22
23
import reactor .ipc .netty .NettyInbound ;
23
24
import reactor .ipc .netty .NettyOutbound ;
25
+ import reactor .ipc .netty .NettyPipeline ;
24
26
25
27
import org .springframework .messaging .Message ;
26
28
import org .springframework .messaging .tcp .TcpConnection ;
@@ -64,6 +66,14 @@ public ListenableFuture<Void> send(Message<P> message) {
64
66
@ Override
65
67
@ SuppressWarnings ("deprecation" )
66
68
public void onReadInactivity (Runnable runnable , long inactivityDuration ) {
69
+
70
+ // TODO: workaround for https://github.com/reactor/reactor-netty/issues/22
71
+ ChannelPipeline pipeline = this .inbound .context ().channel ().pipeline ();
72
+ String name = NettyPipeline .OnChannelReadIdle ;
73
+ if (pipeline .context (name ) != null ) {
74
+ pipeline .remove (name );
75
+ }
76
+
67
77
this .inbound .onReadIdle (inactivityDuration , runnable );
68
78
}
69
79
You can’t perform that action at this time.
0 commit comments