Skip to content

Check for socket handle on each socket call #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 8, 2018

Conversation

VeijoPesonen
Copy link
Contributor

Check for socket handle on each socket call.

Ignore errors about already closed socket from ESP8266 side and return success. Failure is reported if handle does not exist anymore.

Revealing the timeout values to higher layers is a remnant of changes I haven't included to this PR yet. Those might or might not come later.

Veijo Pesonen added 2 commits June 5, 2018 10:36
Return NSAPI_ERROR_NO_SOCKET if invalid handle.

Don't care about ESP8266 complaining about missing socket when closing.
@@ -547,6 +560,14 @@ void ESP8266::_connect_error_handler()
}
}

void ESP8266::_oob_socket_close_error()
{
if (_parser.recv("ERROR\n")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the OOB is "UNLINK ERROR", but triggers with "UNLINK", should you be including also the space somewhere?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those two words are actually on two separate lines

@VeijoPesonen VeijoPesonen merged commit 19d95f5 into master Jun 8, 2018
@VeijoPesonen VeijoPesonen deleted the chk_socket_exist_on_close branch June 8, 2018 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants