mirror of https://github.com/noisymime/Arduino.git
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() {
|
||||
if (!opened)
|
||||
return false;
|
||||
// Client is "connected" if it has unread bytes
|
||||
if (available())
|
||||
return true;
|
||||
|
||||
uint8_t cmd[] = {'L', handle};
|
||||
uint8_t res[1];
|
||||
bridge.transfer(cmd, 2, res, 1);
|
||||
|
|
Loading…
Reference in New Issue