Skip to content

sws: pass in socket reference to allow function to close it#19031

Closed
bagder wants to merge 1 commit into
masterfrom
bagder/sws-service-socket
Closed

sws: pass in socket reference to allow function to close it#19031
bagder wants to merge 1 commit into
masterfrom
bagder/sws-service-socket

Conversation

@bagder

@bagder bagder commented Oct 12, 2025

Copy link
Copy Markdown
Member

The function service_connection() now passes in a reference to the socket instead of by value since the sub function http_connect() might close it and set *infdp = CURL_SOCKET_BAD. This would previously not be detected when service_connection() returned and potentially cause a double close of the socket.

Reported-by: Joshua Rogers

The function service_connection() now passes in a reference to the
socket instead of by value since the sub function http_connect() might
close it and set *infdp = CURL_SOCKET_BAD. This would previously not be
detected when service_connection() returned and potentially cause a
double close of the socket.

Reported-by: Joshua Rogers
@bagder bagder added the tests label Oct 12, 2025
@bagder
bagder marked this pull request as ready for review October 12, 2025 13:35
@bagder bagder closed this in 1e90a63 Oct 12, 2025
@bagder
bagder deleted the bagder/sws-service-socket branch October 12, 2025 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

1 participant