Skip to content

Commit bdae4e3

Browse files
authored
Merge pull request #125 from brentru/fix-ethernet-dc
Add Ethernet disconnect function
2 parents 0a7b431 + 4062895 commit bdae4e3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/AdafruitIO_Ethernet.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ class AdafruitIO_Ethernet : public AdafruitIO {
9999
_status = AIO_NET_CONNECTED;
100100
}
101101
}
102+
103+
/**************************************************************************/
104+
/*!
105+
@brief Disconnect the ethernet connection.
106+
*/
107+
/**************************************************************************/
108+
void _disconnect() {
109+
_client->stop();
110+
delay(AIO_NET_DISCONNECT_WAIT);
111+
}
102112
};
103113

104114
#endif // ADAFRUITIO_ETHERNET_H

0 commit comments

Comments
 (0)