You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2023/03/22 10:21:19 UTC

[wicket] branch WICKET-7032-update-js-tests created (now f3e40820c8)

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a change to branch WICKET-7032-update-js-tests
in repository https://gitbox.apache.org/repos/asf/wicket.git


      at f3e40820c8 WICKET-7034: Publish WebSocket events even if connection was already closed (#562)

This branch includes the following new commits:

     new f3e40820c8 WICKET-7034: Publish WebSocket events even if connection was already closed (#562)

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[wicket] 01/01: WICKET-7034: Publish WebSocket events even if connection was already closed (#562)

Posted by mg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch WICKET-7032-update-js-tests
in repository https://gitbox.apache.org/repos/asf/wicket.git

commit f3e40820c8d459cf668e059f55c76dc4b73e3732
Author: Daniel Stoch <Da...@gmail.com>
AuthorDate: Wed Mar 22 11:20:38 2023 +0100

    WICKET-7034: Publish WebSocket events even if connection was already closed (#562)
    
    Co-authored-by: Daniel Stoch <da...@comarch.com>
    (cherry picked from commit 25d4f5016d2218028f1a997fb1647091088fefd5)
---
 .../apache/wicket/protocol/ws/api/res/js/wicket-websocket-jquery.js   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/res/js/wicket-websocket-jquery.js b/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/res/js/wicket-websocket-jquery.js
index 93b7386794..472c2589fa 100644
--- a/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/res/js/wicket-websocket-jquery.js
+++ b/wicket-native-websocket/wicket-native-websocket-core/src/main/java/org/apache/wicket/protocol/ws/api/res/js/wicket-websocket-jquery.js
@@ -121,16 +121,16 @@
 					if (self.ws) {
 						self.ws.close();
 						self.ws = null;
-						Wicket.Event.publish(topics.Closed, evt);
 					}
+					Wicket.Event.publish(topics.Closed, evt);
 				};
 
 				self.ws.onerror = function (evt) {
 					if (self.ws) {
 						self.ws.close();
 						self.ws = null;
-						Wicket.Event.publish(topics.Error, evt);
 					}
+					Wicket.Event.publish(topics.Error, evt);
 				};
 			} else {
 				var errMessage = '[WebSocket.initialize] WebSocket is not supported in your browser!';