Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

SocketWrapper MbedClient read() fixes#896

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

@JAndrassy
Copy link
Contributor

@JAndrassyJAndrassy commentedJun 16, 2024
edited
Loading

this PR for SocketWrapper's MbedClient fixes crash when invoking read() on stopped client

btw. I am very surprised that read(buff, size) should return -1 if no data are available and 0 if the connection is closed. this is how it is in the documentation and in Ethernet library implementation. and apparently this is how it is in BSD sockets. it is very strange for me.
WiFi101 and Portenta Core's lwipClient return -1 too if no bytes are available
WiFiNINA, WiFiS3, esp8266, esp32 return 0 from read(buff, size) if no data are available

a complete research:https://github.com/Networking-for-Arduino/Arduino-Networking-API/blob/main/ArduinoNetAPILibs.md#clientreadbuff-size-return-value

facchinm reacted with thumbs up emoji
@JAndrassyJAndrassyforce-pushed thembedclient_read_stopped_crash_fix branch fromb94442f to13947c2CompareJune 16, 2024 16:56
@JAndrassyJAndrassyforce-pushed thembedclient_read_stopped_crash_fix branch from13947c2 tofab0676CompareJune 16, 2024 16:59
@facchinmfacchinm merged commit14950ea intoarduino:mainJun 19, 2024
@facchinm
Copy link
Member

Merged, thanks!

@JAndrassyJAndrassy deleted the mbedclient_read_stopped_crash_fix branchJune 19, 2024 07:46
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@JAndrassy@facchinm

[8]ページ先頭

©2009-2025 Movatter.jp