Skip to content

Commit 14ae406

Browse files
committed
close notification socket before unload correctly
1 parent 342cf65 commit 14ae406

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/FIT/Bundle/ModuleDefaultBundle/Resources/views/Module/section.html.twig

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,7 @@ if advised of the possibility of such damage.
118118
var socket = getNotifWebSocket({{ app.request.get('key') }}, "{% if sessionHash is defined %}{{sessionHash}}{% endif %}", "wss://{{ app.request.host }}:8080/");
119119
120120
window.onbeforeunload = function() {
121-
var socket = getNotifWebSocket({{ app.request.get('key') }}, "{% if sessionHash is defined %}{{sessionHash}}{% endif %}", "wss://{{ app.request.host }}:8080/");
122-
socket.close();
121+
socket.websocket.close();
123122
};
124123
if ($(notifOutput).hasClass('hidden')) {
125124
$(notifOutput).removeClass('hidden');

0 commit comments

Comments
 (0)