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: 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
leonardocavagnis wants to merge 8 commits into arduino:main
base: main
Choose a base branch
Loading
from leonardocavagnis:eth_wrapper_fix

Conversation

@leonardocavagnis
Copy link
Member

@leonardocavagnis leonardocavagnis commented Oct 23, 2025

No description provided.

Copy link
Member Author

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.

andreagilardoni and pillo79 reacted with eyes emoji

@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 force-pushed the eth_wrapper_fix branch 3 times, most recently from a22d972 to 51563e5 Compare November 11, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@andreagilardoni andreagilardoni andreagilardoni approved these changes

@pillo79 pillo79 Awaiting requested review from pillo79

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Telnet connection closes immediately when running Zephyr-adapted Advanced Chat Server example

AltStyle によって変換されたページ (->オリジナル) /