aboutsummaryrefslogtreecommitdiff
path: root/discord/voice_client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-08-05 04:21:27 -0400
committerRapptz <[email protected]>2020-08-05 04:21:27 -0400
commita9824ffabf0b2c8031ac75245650711145aaa26c (patch)
tree4e090243663a7622803045f91f1b3b7d10f98604 /discord/voice_client.py
parent[tasks] Remove HTTPException as an exception to silently continue for (diff)
downloaddiscord.py-a9824ffabf0b2c8031ac75245650711145aaa26c.tar.xz
discord.py-a9824ffabf0b2c8031ac75245650711145aaa26c.zip
Fix endpoint strings with :443 instead of :80
Fix #5191 Close #5188
Diffstat (limited to 'discord/voice_client.py')
-rw-r--r--discord/voice_client.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/discord/voice_client.py b/discord/voice_client.py
index bbc1767d..91a7f6ca 100644
--- a/discord/voice_client.py
+++ b/discord/voice_client.py
@@ -187,8 +187,9 @@ class VoiceClient:
'If timeout occurred considering raising the timeout and reconnecting.')
return
- self.endpoint = endpoint.replace(':80', '')
- self.endpoint_ip = socket.gethostbyname(self.endpoint)
+ self.endpoint, _, _ = endpoint.rpartition(':')
+ # This gets set later
+ self.endpoint_ip = None
if self.socket:
try:
@@ -214,7 +215,7 @@ class VoiceClient:
This could be referred to as the Discord Voice WebSocket latency and is
an analogue of user's voice latencies as seen in the Discord client.
-
+
.. versionadded:: 1.4
"""
ws = self.ws
@@ -223,7 +224,7 @@ class VoiceClient:
@property
def average_latency(self):
""":class:`float`: Average of most recent 20 HEARTBEAT latencies in seconds.
-
+
.. versionadded:: 1.4
"""
ws = self.ws