forked from zephyrproject-rtos/arduino-core-zephyr
-
-
Notifications
You must be signed in to change notification settings - Fork 40
SocketWrapper: Refactoring Socket management #227
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
Open
+200
−55
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@leonardocavagnis
leonardocavagnis
linked an issue
Nov 10, 2025
that may be
closed
by this pull request
Member
Author
leonardocavagnis
commented
Nov 10, 2025
After investigation, the issue comes from the destructor in libraries/SocketWrapper/SocketWrapper.h:
~ZephyrSocketWrapper() {
if (sock_fd != -1) {
::close(sock_fd);
}
}
Removing these lines prevents the socket from being closed unexpectedly, and the Telnet session works as expected.
I’ve opened the PR with this change, but this is likely not the correct long-term fix.
Tagging @andreagilardoni to see if he can help point us toward the right approach.
@leonardocavagnis
leonardocavagnis
marked this pull request as ready for review
November 11, 2025 12:14
@leonardocavagnis
leonardocavagnis
changed the title
(削除) Socket Wrapper: fix close and connected functions (削除ここまで)
(追記) SocketWrapper: Refactoring Socket management (追記ここまで)
Nov 11, 2025
@leonardocavagnis
leonardocavagnis
requested review from
andreagilardoni and
pillo79
November 11, 2025 12:15
@leonardocavagnis
leonardocavagnis
force-pushed
the
eth_wrapper_fix
branch
3 times, most recently
from
November 11, 2025 14:48
a22d972 to
51563e5
Compare
libraries/Ethernet/examples/AdvancedChatServer/AdvancedChatServer.ino
Outdated
Show resolved
Hide resolved
@leonardocavagnis
leonardocavagnis
force-pushed
the
eth_wrapper_fix
branch
from
November 13, 2025 15:47
231edce to
2a941c7
Compare
@leonardocavagnis
leonardocavagnis
force-pushed
the
eth_wrapper_fix
branch
from
November 14, 2025 14:44
185c2c6 to
b4e67d6
Compare
@leonardocavagnis
leonardocavagnis
force-pushed
the
eth_wrapper_fix
branch
from
November 14, 2025 15:21
3a8b676 to
472ebb4
Compare
andreagilardoni
andreagilardoni
approved these changes
Dec 2, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.