Skip to content

Commit f8a2f7c

Browse files
author
BiffoBear
committed
Changed _SNSR_SOCK_FIN_WAIT back to SNSR_SOCK_FIN_WAIT as it is used in adafruit_wiznet5k_wsgiserver.py.
1 parent 5fa7b6f commit f8a2f7c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

adafruit_wiznet5k/adafruit_wiznet5k.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
_SNSR_SOCK_SYNSENT = const(0x15)
8383
SNSR_SOCK_SYNRECV = const(0x16)
8484
SNSR_SOCK_ESTABLISHED = const(0x17)
85-
_SNSR_SOCK_FIN_WAIT = const(0x18)
85+
SNSR_SOCK_FIN_WAIT = const(0x18)
8686
_SNSR_SOCK_CLOSING = const(0x1A)
8787
_SNSR_SOCK_TIME_WAIT = const(0x1B)
8888
_SNSR_SOCK_CLOSE_WAIT = const(0x1C)
@@ -825,7 +825,7 @@ def socket_open(self, socket_num: int, conn_mode: int = _SNMR_TCP) -> int:
825825
if status in (
826826
SNSR_SOCK_CLOSED,
827827
_SNSR_SOCK_TIME_WAIT,
828-
_SNSR_SOCK_FIN_WAIT,
828+
SNSR_SOCK_FIN_WAIT,
829829
_SNSR_SOCK_CLOSE_WAIT,
830830
_SNSR_SOCK_CLOSING,
831831
_SNSR_SOCK_UDP,
@@ -1051,7 +1051,7 @@ def socket_write(
10511051
if self.socket_status(socket_num)[0] in (
10521052
SNSR_SOCK_CLOSED,
10531053
_SNSR_SOCK_TIME_WAIT,
1054-
_SNSR_SOCK_FIN_WAIT,
1054+
SNSR_SOCK_FIN_WAIT,
10551055
_SNSR_SOCK_CLOSE_WAIT,
10561056
_SNSR_SOCK_CLOSING,
10571057
) or (timeout and time.monotonic() - stamp > timeout):

adafruit_wiznet5k/adafruit_wiznet5k_socket.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def __exit__(self, exc_type, exc_val, exc_tb) -> None:
179179
if self._sock_type == SOCK_STREAM:
180180
self.disconnect()
181181
stamp = time.monotonic()
182-
while self.status == wiznet5k.adafruit_wiznet5k._SNSR_SOCK_FIN_WAIT:
182+
while self.status == wiznet5k.adafruit_wiznet5k.SNSR_SOCK_FIN_WAIT:
183183
if time.monotonic() - stamp > 1000:
184184
raise RuntimeError("Failed to disconnect socket")
185185
self.close()
@@ -228,7 +228,7 @@ def connected(self) -> bool:
228228
wiznet5k.adafruit_wiznet5k.SNSR_SOCK_CLOSED,
229229
wiznet5k.adafruit_wiznet5k.SNSR_SOCK_LISTEN,
230230
wiznet5k.adafruit_wiznet5k._SNSR_SOCK_TIME_WAIT,
231-
wiznet5k.adafruit_wiznet5k._SNSR_SOCK_FIN_WAIT,
231+
wiznet5k.adafruit_wiznet5k.SNSR_SOCK_FIN_WAIT,
232232
)
233233
if not result and status != wiznet5k.adafruit_wiznet5k.SNSR_SOCK_LISTEN:
234234
self.close()

0 commit comments

Comments
 (0)