mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-11 05:54:16 +01:00
Fixes YunClient's connected() to behave like other Clients (WiFiClient, EthernetClient, etc)
This commit is contained in:
parent
c4de750253
commit
6f566776f9
@ -114,6 +114,10 @@ void YunClient::flush() {
|
|||||||
uint8_t YunClient::connected() {
|
uint8_t YunClient::connected() {
|
||||||
if (!opened)
|
if (!opened)
|
||||||
return false;
|
return false;
|
||||||
|
// Client is "connected" if it has unread bytes
|
||||||
|
if (available())
|
||||||
|
return true;
|
||||||
|
|
||||||
uint8_t cmd[] = {'L', handle};
|
uint8_t cmd[] = {'L', handle};
|
||||||
uint8_t res[1];
|
uint8_t res[1];
|
||||||
bridge.transfer(cmd, 2, res, 1);
|
bridge.transfer(cmd, 2, res, 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user