Skip to content

Commit e27d8d0

Browse files
committed
Adapt to more Reactor API changes
See gh-943 Signed-off-by: Rossen Stoyanchev <[email protected]>
1 parent 6e823a1 commit e27d8d0

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: rsocket-core/src/main/java/io/rsocket/resume/ResumableDuplexConnection.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2015-2019 the original author or authors.
2+
* Copyright 2015-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -114,9 +114,9 @@ void initConnection(DuplexConnection nextConnection) {
114114
__ -> {
115115
frameReceivingSubscriber.dispose();
116116
disposable.dispose();
117-
Sinks.Emission emission = onConnectionClosedSink.tryEmitNext(currentConnectionIndex);
118-
if (emission.equals(Sinks.Emission.OK)) {
119-
logger.error("Failed to notify session of closed connection: {}", emission);
117+
Sinks.EmitResult result = onConnectionClosedSink.tryEmitNext(currentConnectionIndex);
118+
if (result.equals(Sinks.EmitResult.OK)) {
119+
logger.error("Failed to notify session of closed connection: {}", result);
120120
}
121121
})
122122
.subscribe();

Diff for: rsocket-examples/src/main/java/io/rsocket/examples/transport/tcp/fnf/TaskProcessingWithServerSideNotificationsExample.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,10 @@ public RSocketTaskHandler(
213213
@Override
214214
public Mono<Void> fireAndForget(Payload payload) {
215215
logger.info("Received a Task[{}] from Client.ID[{}]", payload.getDataUtf8(), id);
216-
Sinks.Emission emission = tasksToProcess.tryEmitNext(new Task(id, payload.getDataUtf8()));
216+
Sinks.EmitResult result = tasksToProcess.tryEmitNext(new Task(id, payload.getDataUtf8()));
217217
payload.release();
218-
return emission.hasFailed()
219-
? Mono.error(new Sinks.EmissionException(emission))
218+
return result.isFailure()
219+
? Mono.error(new Sinks.EmissionException(result))
220220
: Mono.empty();
221221
}
222222

0 commit comments

Comments
 (0)