Skip to content

Commit e7b06a8

Browse files
authored
fix: Correctly handle race condition if voice keepalive procs while reconnecting (#1449)
1 parent 9fc1aed commit e7b06a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interactions/api/voice/voice_gateway.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def _udp_keep_alive(self) -> None:
268268
keep_alive = b"\xc9\x00\x00\x00\x00\x00\x00\x00\x00"
269269

270270
self.logger.debug("Starting UDP Keep Alive")
271-
while not self.socket._closed and not self.ws.closed:
271+
while not self.socket._closed and self.ws and not self.ws.closed:
272272
try:
273273
_, writable, _ = select.select([], [self.socket], [], 0)
274274
while not writable:

0 commit comments

Comments
 (0)