Skip to content

Commit 8c3e417

Browse files
committed
Replace while by if, looping exception does not make sense
Not really any bug, but it does not make sense and is a bit confusing.
1 parent a0e9562 commit 8c3e417

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_wiznet5k/adafruit_wiznet5k_socket.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def accept(
414414
client_sock._socknum = current_socknum # pylint: disable=protected-access
415415
self._bind((None, self._listen_port))
416416
self.listen()
417-
while self._status != wiznet5k.adafruit_wiznet5k.SNSR_SOCK_LISTEN:
417+
if self._status != wiznet5k.adafruit_wiznet5k.SNSR_SOCK_LISTEN:
418418
raise RuntimeError("Failed to open new listening socket")
419419
return client_sock, addr
420420

0 commit comments

Comments
 (0)