changeset 2484:71e565a46274

Change WebSocket port from TCP 444 to 5222 and also fix the WS connect failure / error message since we have supported IPv6 for a while.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 18 Feb 2023 17:52:14 +0200
parents 4541c68e1ebf
children 81a0f6e6256c
files www/search.js
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/www/search.js	Sat Feb 18 17:51:06 2023 +0200
+++ b/www/search.js	Sat Feb 18 17:52:14 2023 +0200
@@ -4,7 +4,6 @@
 // (C) Copyright 2017-2019 Tecnic Software productions (TNSP)
 //
 
-var mapServer = "wss://tnsp.org:444";
 var fieldPattern, chosenPattern = 0;
 var msgLog, mapWS, tmpWS, locWS, mapList = [];
 var mapItemToggles = new Array();
@@ -184,7 +183,8 @@
 {
   if ("WebSocket" in window)
   {
-    var tmpWS = new WebSocket(mapServer);
+    var mapPort = "5222";
+    var tmpWS = new WebSocket("wss://tnsp.org:"+ mapPort);
     if (!tmpWS)
     {
       mapResult("WebSocket error: Could not create WebSocket.");
@@ -195,8 +195,8 @@
     {
       mapResult("<b>WebSocket error occured!</b>"+
       "<p>If this problem persists for more than few hours AND this search HAS worked for you before, "+
-      "AND you are NOT using a IPv6 connection, please send e-mail to ccr@tnsp.org and report the problem.</p>"+
-      "<p>Do note that IPv6 connections are not currently supported by the MapSearch WebSocket server and in such case this error is expected.</p>");
+      "you should check if your Internet provider and firewall allow connections to TCP port "+ mapPort +".</p>"
+      );
       console.error("WebSocket error occured: ", mev);
     };