Skip to content

Commit

Permalink
Merge pull request #150 from pinkavaj/pi-fix-sock-exit
Browse files Browse the repository at this point in the history
Properly close socked which is already in disconnection state
  • Loading branch information
FoamyGuy authored Apr 27, 2024
2 parents 93e8bb3 + d638117 commit 4c35a79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adafruit_wiznet5k/adafruit_wiznet5k_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def __exit__(self, exc_type, exc_val, exc_tb) -> None:
_the_interface.release_socket(self._socknum)
if self._sock_type == SOCK_STREAM:
_the_interface.write_snir(
self._socknum, 0xFF
self._socknum, 0xFF & (~wiznet5k.adafruit_wiznet5k.SNIR_DISCON)
) # Reset socket interrupt register.
_the_interface.socket_disconnect(self._socknum)
mask = (
Expand Down

0 comments on commit 4c35a79

Please sign in to comment.