File tree 1 file changed +7
-1
lines changed
src/main/java/io/r2dbc/postgresql/client
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 29
29
import io .netty .handler .codec .LengthFieldBasedFrameDecoder ;
30
30
import io .netty .handler .logging .LogLevel ;
31
31
import io .netty .handler .logging .LoggingHandler ;
32
+ import io .netty .util .ReferenceCountUtil ;
32
33
import io .netty .util .internal .logging .InternalLogger ;
33
34
import io .netty .util .internal .logging .InternalLoggerFactory ;
34
35
import io .r2dbc .postgresql .message .backend .BackendKeyData ;
@@ -145,7 +146,12 @@ private ReactorNettyClient(Connection connection) {
145
146
receiver .sink .complete ();
146
147
this .conversations .poll ();
147
148
} else {
148
- receiver .sink .next (message );
149
+
150
+ if (receiver .sink .isCancelled ()) {
151
+ ReferenceCountUtil .release (message );
152
+ } else {
153
+ receiver .sink .next (message );
154
+ }
149
155
}
150
156
}
151
157
})
You can’t perform that action at this time.
0 commit comments