diff --git a/adafruit_wiznet5k/adafruit_wiznet5k_socket.py b/adafruit_wiznet5k/adafruit_wiznet5k_socket.py index 375d471..e9f6605 100644 --- a/adafruit_wiznet5k/adafruit_wiznet5k_socket.py +++ b/adafruit_wiznet5k/adafruit_wiznet5k_socket.py @@ -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 = (