Skip to content

bsd_close_socket preserves the error code#196

Closed
aditmak wants to merge 0 commit into
uNetworking:masterfrom
xentara:master
Closed

bsd_close_socket preserves the error code#196
aditmak wants to merge 0 commit into
uNetworking:masterfrom
xentara:master

Conversation

@aditmak

@aditmak aditmak commented Feb 21, 2023

Copy link
Copy Markdown

I am using the uWebsocket application. When I call the application's listen function to open the port and begin listening it failed.
Because the application failed to listen, it closes the socket and exits gracefully. So, if there is an error while opening the port, the errno variable is updated with the error code then the close socket function is called and it updates the errno, causing the error information from the listening socket failure to be lost.
By preserving the errno after the close socket function, the real error can be determined.

@georg-emg

Copy link
Copy Markdown

This PR was submitted by someone in our company some time ago, but the source branch was mistakenly specified as master rather than a dedicated branch. A new PR ( #254) has been submitted with a correct source branch. This PR is defunct and can be closed. Sorry about that.

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