Skip to content

Commit 6455b44

Browse files
authored
Merge pull request #202 from reckart/bugfix/201-WebSocketMessageSenderDefault.sendTo()-fails-when-no-Wicket-application-is-bound-to-the-current-thread
Issue #201 - WebSocketMessageSenderDefault.sendTo() fails when no Wicket application is bound to the current thread
2 parents bed77c6 + a705bda commit 6455b44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

wicket-spring-boot-starter/src/main/java/com/giffing/wicket/spring/boot/starter/web/servlet/websocket/WebSocketMessageSenderDefault.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,12 @@ public void sendToAll(IWebSocketPushMessage event) {
3434
}
3535
}
3636

37-
public void sendTo(Object identifier, IWebSocketPushMessage event) {
37+
@Override
38+
public void sendTo(Object identifier, IWebSocketPushMessage event) {
3839
if(identifier == null) {
3940
return;
4041
}
41-
Application application = Application.get();
42+
4243
WebSocketSettings webSocketSettings = WebSocketSettings.Holder.get(application);
4344
IWebSocketConnectionRegistry connectionRegistry = webSocketSettings.getConnectionRegistry();
4445
wicketSessionResolver.resolve(identifier).forEach(sessionId -> {
@@ -49,5 +50,4 @@ public void sendTo(Object identifier, IWebSocketPushMessage event) {
4950
}
5051
});
5152
}
52-
5353
}

0 commit comments

Comments
 (0)