mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-23 03:59:36 +00:00
only send push notification if call stream not cancelled
This commit is contained in:
parent
c5f6aeb4cc
commit
9f8bd77c9e
1 changed files with 4 additions and 1 deletions
|
@ -10,6 +10,7 @@ import bisq.proto.grpc.SendNotificationReply;
|
||||||
import bisq.proto.grpc.SendNotificationRequest;
|
import bisq.proto.grpc.SendNotificationRequest;
|
||||||
import io.grpc.Context;
|
import io.grpc.Context;
|
||||||
import io.grpc.ServerInterceptor;
|
import io.grpc.ServerInterceptor;
|
||||||
|
import io.grpc.stub.ServerCallStreamObserver;
|
||||||
import io.grpc.stub.StreamObserver;
|
import io.grpc.stub.StreamObserver;
|
||||||
|
|
||||||
import javax.inject.Inject;
|
import javax.inject.Inject;
|
||||||
|
@ -80,7 +81,9 @@ class GrpcNotificationsService extends NotificationsImplBase {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(@NonNull NotificationMessage message) {
|
public void onMessage(@NonNull NotificationMessage message) {
|
||||||
responseObserver.onNext(message);
|
if (!((ServerCallStreamObserver<NotificationMessage>) responseObserver).isCancelled()) {
|
||||||
|
responseObserver.onNext(message);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue