Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
44f5a4db
Commit
44f5a4db
authored
Jul 16, 2018
by
me-no-dev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Client returning disconnected because of VFS errors
parent
e63aa406
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
libraries/WiFi/src/WiFiClient.cpp
libraries/WiFi/src/WiFiClient.cpp
+17
-3
No files found.
libraries/WiFi/src/WiFiClient.cpp
View file @
44f5a4db
...
...
@@ -438,9 +438,23 @@ uint8_t WiFiClient::connected()
if
(
_connected
)
{
uint8_t
dummy
;
int
res
=
recv
(
fd
(),
&
dummy
,
0
,
MSG_DONTWAIT
);
if
(
res
<=
0
&&
errno
!=
EWOULDBLOCK
)
{
_connected
=
false
;
log_i
(
"Disconnected: RES: %d, ERR: %d"
,
res
,
errno
);
switch
(
errno
)
{
case
EWOULDBLOCK
:
case
ENOENT
:
//caused by vfs
_connected
=
true
;
break
;
case
ENOTCONN
:
case
EPIPE
:
case
ECONNRESET
:
case
ECONNREFUSED
:
case
ECONNABORTED
:
_connected
=
false
;
log_d
(
"Disconnected: RES: %d, ERR: %d"
,
res
,
errno
);
break
;
default:
log_i
(
"Unexpected: RES: %d, ERR: %d"
,
res
,
errno
);
_connected
=
true
;
break
;
}
}
return
_connected
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment