mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-02-25 08:51:19 -05: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,9 +81,11 @@ class GrpcNotificationsService extends NotificationsImplBase {
|
||||
|
||||
@Override
|
||||
public void onMessage(@NonNull NotificationMessage message) {
|
||||
if (!((ServerCallStreamObserver<NotificationMessage>) responseObserver).isCancelled()) {
|
||||
responseObserver.onNext(message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final ServerInterceptor[] interceptors() {
|
||||
Optional<ServerInterceptor> rateMeteringInterceptor = rateMeteringInterceptor();
|
||||
|
Loading…
x
Reference in New Issue
Block a user