Skip to content

Commit bf4d00c

Browse files
committed
Upgrade to Reactor Bismuth snapshots
Towards SR13 to confirm fix for SPR-17306.
1 parent 6ea3441 commit bf4d00c

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ ext {
4848
kotlinVersion = "1.2.51"
4949
log4jVersion = "2.11.1"
5050
nettyVersion = "4.1.29.Final"
51-
reactorVersion = "Bismuth-SR11"
51+
reactorVersion = "Bismuth-BUILD-SNAPSHOT"
5252
rxjavaVersion = "1.3.8"
5353
rxjavaAdapterVersion = "1.2.1"
5454
rxjava2Version = "2.1.17"
@@ -152,6 +152,7 @@ configure(allprojects) { project ->
152152

153153
repositories {
154154
maven { url "https://repo.spring.io/libs-release" }
155+
maven { url "https://repo.spring.io/snapshot" } // Reactor Bismuth snapshots (towards SR13)
155156
}
156157

157158
dependencies {

spring-webflux/src/main/java/org/springframework/web/reactive/socket/adapter/ReactorNettyWebSocketSession.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ public Mono<Void> send(Publisher<WebSocketMessage> messages) {
7070

7171
@Override
7272
public Mono<Void> close(CloseStatus status) {
73-
WebSocketFrame closeFrame = new CloseWebSocketFrame(status.getCode(), status.getReason());
74-
return getDelegate().getOutbound().sendObject(closeFrame).then();
73+
return getDelegate().getOutbound().sendClose(status.getCode(), status.getReason());
7574
}
7675

7776

spring-webflux/src/test/java/org/springframework/web/reactive/socket/WebSocketIntegrationTests.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ private static class SessionClosingHandler implements WebSocketHandler {
197197

198198
@Override
199199
public Mono<Void> handle(WebSocketSession session) {
200-
return Flux.never().mergeWith(session.close(CloseStatus.GOING_AWAY)).then();
200+
return session.send(Flux
201+
.error(new Throwable())
202+
.onErrorResume(ex -> session.close(CloseStatus.GOING_AWAY)) // SPR-17306 (nested close)
203+
.cast(WebSocketMessage.class));
201204
}
202205
}
203206

0 commit comments

Comments
 (0)