We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0108ded commit b94442fCopy full SHA for b94442f
libraries/SocketWrapper/src/MbedClient.cpp
@@ -229,6 +229,8 @@ int arduino::MbedClient::available() {
229
}
230
231
int arduino::MbedClient::read() {
232
+ if (sock == nullptr)
233
+ return -1;
234
mutex->lock();
235
if (!available()) {
236
mutex->unlock();
@@ -241,12 +243,14 @@ int arduino::MbedClient::read() {
241
243
242
244
245
int arduino::MbedClient::read(uint8_t *data, size_t len) {
246
247
+ return 0;
248
249
int avail = available();
250
251
if (!avail) {
252
- return -1;
253
254
255
256
if ((int)len > avail) {
0 commit comments