We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5cea507 + 4a5775a commit fc0f07cCopy full SHA for fc0f07c
adafruit_ntp.py
@@ -85,11 +85,8 @@ def datetime(self) -> time.struct_time:
85
for i in range(1, PACKET_SIZE):
86
self._packet[i] = 0
87
with self._pool.socket(self._pool.AF_INET, self._pool.SOCK_DGRAM) as sock:
88
- # Since the ESP32SPI doesn't support sendto, we are using
89
- # connect + send to standardize code
90
sock.settimeout(self._socket_timeout)
91
- sock.connect(self._socket_address)
92
- sock.send(self._packet)
+ sock.sendto(self._packet, self._socket_address)
93
sock.recv_into(self._packet)
94
# Get the time in the context to minimize the difference between it and receiving
95
# the packet.
0 commit comments