js: improve connection check
authorMaximilian Krambach <maximilian.krambach@intevation.de>
Wed, 3 Jul 2019 14:19:44 +0000 (16:19 +0200)
committerMaximilian Krambach <maximilian.krambach@intevation.de>
Wed, 3 Jul 2019 14:19:44 +0000 (16:19 +0200)
commited1dffb4748e686e525883b5efde9288b8e003d3
tree261bdd49bb2334c8d14a3844aa3afb6a00cb2a32
parentf5e27a12d3fd22b95e83c03a5650659bfa2299b9
js: improve connection check

--

* Connection.js: In some cases, the browser disconnect does not
  happen inmediately (e.g. wrong extension for the app). I added a
  delay of 25 ms to see if the connection was closed by the browser.
  Also, I tried to make the checkConnection more readable.
lang/js/BrowserTestExtension/tests/startup.js
lang/js/src/Connection.js