solomax commented on code in PR #509:
URL: https://github.com/apache/wicket/pull/509#discussion_r843421689
##########
wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/WebSocketRequestHandler.java:
##########
@@ -77,6 +78,36 @@ public void push(CharSequence message)
}
}
+ @Override
+ public Future<Void> pushAsync(CharSequence message, long timeout)
+ {
+ if (connection.isOpen())
+ {
+ Args.notNull(message, "message");
+ return connection.sendMessageAsync(message.toString(),
timeout);
+ }
+ else
+ {
+ LOG.warn("The websocket connection is already closed.
Cannot push the text message '{}'", message);
+ }
+ return null;
+ }
+
+ @Override
+ public Future<Void> pushAsync(CharSequence message)
Review Comment:
I would replace this method with `return pushAsync(message, -1)`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]