Skip to content

Commit a09a95a

Browse files
authored
Merge pull request #148 from pinkavaj/pi-fix-if
Replace while by if, looping exception does not make sense
2 parents 93d6d28 + 8c3e417 commit a09a95a

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
@@ -415,7 +415,7 @@ def accept(
415415
client_sock._socknum = current_socknum # pylint: disable=protected-access
416416
self._bind((None, self._listen_port))
417417
self.listen()
418-
while self._status != wiznet5k.adafruit_wiznet5k.SNSR_SOCK_LISTEN:
418+
if self._status != wiznet5k.adafruit_wiznet5k.SNSR_SOCK_LISTEN:
419419
raise RuntimeError("Failed to open new listening socket")
420420
return client_sock, addr
421421

0 commit comments

Comments
 (0)