File tree Expand file tree Collapse file tree 1 file changed +16
-14
lines changed
src/main/java/io/reactivesocket/internal Expand file tree Collapse file tree 1 file changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -279,23 +279,25 @@ public void onNext(Frame requestFrame) {
279
279
final RejectedException exception = new RejectedException ("No associated lease" );
280
280
responsePublisher = PublisherUtils .errorFrame (streamId , exception );
281
281
}
282
-
283
- connection .addOutput (responsePublisher , new Completable () {
284
- @ Override
285
- public void success () {
286
- // TODO Auto-generated method stub
287
- }
288
282
289
- @ Override
290
- public void error (Throwable e ) {
291
- // TODO validate with unit tests
292
- if (childTerminated .compareAndSet (false , true )) {
293
- errorStream .accept (new RuntimeException ("Error writing" , e )); // TODO should we have typed RuntimeExceptions?
294
- cancel ();
283
+ if (responsePublisher != null ) {
284
+ connection .addOutput (responsePublisher , new Completable () {
285
+ @ Override
286
+ public void success () {
287
+ // TODO Auto-generated method stub
295
288
}
296
- }
297
289
298
- });
290
+ @ Override
291
+ public void error (Throwable e ) {
292
+ // TODO validate with unit tests
293
+ if (childTerminated .compareAndSet (false , true )) {
294
+ errorStream .accept (new RuntimeException ("Error writing" , e )); // TODO should we have typed RuntimeExceptions?
295
+ cancel ();
296
+ }
297
+ }
298
+
299
+ });
300
+ }
299
301
}
300
302
}
301
303
You can’t perform that action at this time.
0 commit comments