File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
vaadin-dev-server/src/main/java/com/vaadin/base/devserver/viteproxy Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,15 @@ public class ViteWebsocketProxy implements MessageHandler.Whole<String> {
52
52
public ViteWebsocketProxy (Session browserSession , Integer vitePort )
53
53
throws InterruptedException , ExecutionException {
54
54
viteConnection = new ViteWebsocketConnection (vitePort ,
55
- browserSession .getNegotiatedSubprotocol (), msg -> {
56
- try {
57
- browserSession . getBasicRemote (). sendText ( msg );
58
- getLogger ().debug ("Message sent to browser: " + msg );
59
- } catch ( Exception e ) {
55
+ browserSession .getNegotiatedSubprotocol (),
56
+ msg -> browserSession . getAsyncRemote (). sendText ( msg , result -> {
57
+ if ( result . isOK ()) {
58
+ getLogger ().debug ("Message sent to browser: {}" , msg );
59
+ } else {
60
60
getLogger ().debug ("Error sending message to browser" ,
61
- e );
61
+ result . getException () );
62
62
}
63
- }, () -> {
63
+ }) , () -> {
64
64
try {
65
65
browserSession .close ();
66
66
} catch (IOException e ) {
You can’t perform that action at this time.
0 commit comments