Univention Bugzilla – Attachment 11025 Details for
Bug 53995
"Authentication error" pop up
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Check port
0001-Alternative-ping-still-opens-a-connection-on-veyon-w.patch (text/plain), 1.65 KB, created by
Jürn Brodersen
on 2023-01-30 18:50:40 CET
(
hide
)
Description:
Check port
Filename:
MIME Type:
Creator:
Jürn Brodersen
Created:
2023-01-30 18:50:40 CET
Size:
1.65 KB
patch
obsolete
>From 41b27f9d056320229f38d777510e6f26bf946ecf Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?J=C3=BCrn=20Brodersen?= <brodersen@univention.de> >Date: Thu, 4 Aug 2022 09:55:19 +0200 >Subject: [PATCH] Alternative ping; still opens a connection on veyon windows?! > :( >Organization: Univention GmbH, Bremen, Germany > >--- > ucs-school-veyon-client/veyon_client/client.py | 11 ++++------- > 1 file changed, 4 insertions(+), 7 deletions(-) > >diff --git a/ucs-school-veyon-client/veyon_client/client.py b/ucs-school-veyon-client/veyon_client/client.py >index d3b75d646..9a10600ae 100644 >--- a/ucs-school-veyon-client/veyon_client/client.py >+++ b/ucs-school-veyon-client/veyon_client/client.py >@@ -27,6 +27,7 @@ > # /usr/share/common-licenses/AGPL-3; if not, see > # <http://www.gnu.org/licenses/>. > >+import socket > import time > from collections import defaultdict > from datetime import datetime >@@ -202,13 +203,9 @@ class VeyonClient: > > def ping(self, host=None): # type: (Optional[str]) -> bool > host = host if host else self._default_host >- try: >- result = requests.get( >- "{}/authentication/{}".format(self._url, host), timeout=self._ping_timeout >- ) >- return result.status_code == 200 >- except requests.ReadTimeout: >- return False >+ with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as veyon_socket: >+ veyon_socket.settimeout(self._ping_timeout) >+ return veyon_socket.connect_ex((host, 11100)) == 0 > > def set_feature(self, feature, host=None, active=True, arguments=None): > # type: (Feature, Optional[str], Optional[bool], Optional[Dict[str, str]]) -> None >-- >2.37.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 53995
: 11025