mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-06 05:01:14 -07:00
Bump websocket-client from 1.7.0 to 1.8.0 (#2313)
* Bump websocket-client from 1.7.0 to 1.8.0 Bumps [websocket-client](https://github.com/websocket-client/websocket-client) from 1.7.0 to 1.8.0. - [Release notes](https://github.com/websocket-client/websocket-client/releases) - [Changelog](https://github.com/websocket-client/websocket-client/blob/master/ChangeLog) - [Commits](https://github.com/websocket-client/websocket-client/compare/v1.7.0...v1.8.0) --- updated-dependencies: - dependency-name: websocket-client dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Update websocket-client==1.8.0 --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> [skip ci]
This commit is contained in:
parent
5d0ba8b222
commit
dab46249f2
22 changed files with 225 additions and 184 deletions
|
@ -13,13 +13,14 @@ from ._exceptions import (
|
|||
WebSocketException,
|
||||
WebSocketTimeoutException,
|
||||
)
|
||||
from ._ssl_compat import SSLEOFError
|
||||
from ._url import parse_url
|
||||
|
||||
"""
|
||||
_app.py
|
||||
websocket - WebSocket client library for Python
|
||||
|
||||
Copyright 2023 engn33r
|
||||
Copyright 2024 engn33r
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
@ -165,6 +166,7 @@ class WebSocketApp:
|
|||
url: str,
|
||||
header: Union[list, dict, Callable, None] = None,
|
||||
on_open: Optional[Callable[[WebSocket], None]] = None,
|
||||
on_reconnect: Optional[Callable[[WebSocket], None]] = None,
|
||||
on_message: Optional[Callable[[WebSocket, Any], None]] = None,
|
||||
on_error: Optional[Callable[[WebSocket, Any], None]] = None,
|
||||
on_close: Optional[Callable[[WebSocket, Any, Any], None]] = None,
|
||||
|
@ -194,6 +196,10 @@ class WebSocketApp:
|
|||
Callback object which is called at opening websocket.
|
||||
on_open has one argument.
|
||||
The 1st argument is this class object.
|
||||
on_reconnect: function
|
||||
Callback object which is called at reconnecting websocket.
|
||||
on_reconnect has one argument.
|
||||
The 1st argument is this class object.
|
||||
on_message: function
|
||||
Callback object which is called when received data.
|
||||
on_message has 2 arguments.
|
||||
|
@ -244,6 +250,7 @@ class WebSocketApp:
|
|||
self.cookie = cookie
|
||||
|
||||
self.on_open = on_open
|
||||
self.on_reconnect = on_reconnect
|
||||
self.on_message = on_message
|
||||
self.on_data = on_data
|
||||
self.on_error = on_error
|
||||
|
@ -424,6 +431,7 @@ class WebSocketApp:
|
|||
self.ping_interval = ping_interval
|
||||
self.ping_timeout = ping_timeout
|
||||
self.ping_payload = ping_payload
|
||||
self.has_done_teardown = False
|
||||
self.keep_running = True
|
||||
|
||||
def teardown(close_frame: ABNF = None):
|
||||
|
@ -495,7 +503,10 @@ class WebSocketApp:
|
|||
if self.ping_interval:
|
||||
self._start_ping_thread()
|
||||
|
||||
self._callback(self.on_open)
|
||||
if reconnecting and self.on_reconnect:
|
||||
self._callback(self.on_reconnect)
|
||||
else:
|
||||
self._callback(self.on_open)
|
||||
|
||||
dispatcher.read(self.sock.sock, read, check)
|
||||
except (
|
||||
|
@ -516,9 +527,10 @@ class WebSocketApp:
|
|||
except (
|
||||
WebSocketConnectionClosedException,
|
||||
KeyboardInterrupt,
|
||||
SSLEOFError,
|
||||
) as e:
|
||||
if custom_dispatcher:
|
||||
return handleDisconnect(e)
|
||||
return handleDisconnect(e, bool(reconnect))
|
||||
else:
|
||||
raise e
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue