Skip to content

Commit

Permalink
Fixes YunClient's connected() to behave like other Clients (WiFiClien…
Browse files Browse the repository at this point in the history
…t, EthernetClient, etc)
  • Loading branch information
RobAtticus authored and cmaglie committed Jun 30, 2015
1 parent c4de750 commit 6f56677
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libraries/Bridge/src/YunClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6f56677

Please sign in to comment.