Skip to content

Commit

Permalink
Merge pull request #125 from brentru/fix-ethernet-dc
Browse files Browse the repository at this point in the history
Add Ethernet disconnect function
  • Loading branch information
brentru authored Jun 8, 2020
2 parents 0a7b431 + 4062895 commit bdae4e3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/AdafruitIO_Ethernet.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ class AdafruitIO_Ethernet : public AdafruitIO {
_status = AIO_NET_CONNECTED;
}
}

/**************************************************************************/
/*!
@brief Disconnect the ethernet connection.
*/
/**************************************************************************/
void _disconnect() {
_client->stop();
delay(AIO_NET_DISCONNECT_WAIT);
}
};

#endif // ADAFRUITIO_ETHERNET_H

0 comments on commit bdae4e3

Please sign in to comment.