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.
1 parent 5cdcdbc commit d06b06aCopy full SHA for d06b06a
src/socket.cpp
@@ -513,10 +513,11 @@ bool EthernetClass::socketSendUDP(uint8_t s)
513
{
514
SPI.beginTransaction(SPI_ETHERNET_SETTINGS);
515
W5100.execCmdSn(s, Sock_SEND);
516
-
+ uint32_t startWait = millis();
517
+
518
/* +2008.01 bj */
519
while ( (W5100.readSnIR(s) & SnIR::SEND_OK) != SnIR::SEND_OK ) {
- if (W5100.readSnIR(s) & SnIR::TIMEOUT) {
520
+ if ((W5100.readSnIR(s) & SnIR::TIMEOUT) || ((millis() - startWait) > 1000)) {
521
/* +2008.01 [bj]: clear interrupt */
522
W5100.writeSnIR(s, (SnIR::SEND_OK|SnIR::TIMEOUT));
523
SPI.endTransaction();
0 commit comments