mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-11-10 05:03:35 +01:00
only send push notification if call stream not cancelled
This commit is contained in:
parent
c5f6aeb4cc
commit
9f8bd77c9e
@ -10,6 +10,7 @@ import bisq.proto.grpc.SendNotificationReply;
|
||||
import bisq.proto.grpc.SendNotificationRequest;
|
||||
import io.grpc.Context;
|
||||
import io.grpc.ServerInterceptor;
|
||||
import io.grpc.stub.ServerCallStreamObserver;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
|
||||
import javax.inject.Inject;
|
||||
@ -80,7 +81,9 @@ class GrpcNotificationsService extends NotificationsImplBase {
|
||||
|
||||
@Override
|
||||
public void onMessage(@NonNull NotificationMessage message) {
|
||||
responseObserver.onNext(message);
|
||||
if (!((ServerCallStreamObserver<NotificationMessage>) responseObserver).isCancelled()) {
|
||||
responseObserver.onNext(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user