From f5e8eecf7c694fee2ce7dc1b4145a9fc5bda899a Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Wed, 27 Jan 2021 03:29:34 +0100 Subject: [PATCH] Use custom BufferTimeout implementation --- .../td/middle/server/AsyncTdMiddleEventBusServer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/it/tdlight/tdlibsession/td/middle/server/AsyncTdMiddleEventBusServer.java b/src/main/java/it/tdlight/tdlibsession/td/middle/server/AsyncTdMiddleEventBusServer.java index 68cc6a5..da0324b 100644 --- a/src/main/java/it/tdlight/tdlibsession/td/middle/server/AsyncTdMiddleEventBusServer.java +++ b/src/main/java/it/tdlight/tdlibsession/td/middle/server/AsyncTdMiddleEventBusServer.java @@ -25,10 +25,10 @@ import it.tdlight.tdlibsession.td.middle.TdResultList; import it.tdlight.tdlibsession.td.middle.TdResultListMessageCodec; import it.tdlight.tdlibsession.td.middle.TdResultMessage; import it.tdlight.utils.BinlogUtils; +import it.tdlight.utils.BufferTimeOutPublisher; import it.tdlight.utils.MonoUtils; import java.net.ConnectException; import java.time.Duration; -import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import reactor.core.publisher.Flux; @@ -344,9 +344,9 @@ public class AsyncTdMiddleEventBusServer extends AbstractVerticle { return update; } })) - //.transform(normal -> new BufferTimeOutPublisher<>(normal, Math.max(1, tdOptions.getEventsSize()), local ? Duration.ofMillis(1) : Duration.ofMillis(100))) + .transform(normal -> new BufferTimeOutPublisher<>(normal, Math.max(1, tdOptions.getEventsSize()), local ? Duration.ofMillis(1) : Duration.ofMillis(100))) //.bufferTimeout(Math.max(1, tdOptions.getEventsSize()), local ? Duration.ofMillis(1) : Duration.ofMillis(100)) - .map(List::of) + //.map(List::of) .map(TdResultList::new); var fluxCodec = new TdResultListMessageCodec();