Skip to content

Close IPC socket on connect failure#3111

Merged
chriseth merged 1 commit intodevelopfrom
test-close-failure
Oct 19, 2017
Merged

Close IPC socket on connect failure#3111
chriseth merged 1 commit intodevelopfrom
test-close-failure

Conversation

@axic
Copy link
Contributor

@axic axic commented Oct 19, 2017

Without this two different error messages are displayed if cannot connect to IPC and number of sockets is exhausted:

/Users/alex/Projects/solidity/test/RPCSession.cpp:77: fatal error: in "SolidityEndToEndTest/base_constructor_arguments": Error connecting to IPC socket: /invalid
/Users/alex/Projects/solidity/test/RPCSession.cpp:74: fatal error: in "SolidityEndToEndTest/function_usage_in_constructor_arguments": Error creating IPC socket object

@axic axic requested a review from chriseth October 19, 2017 10:02

if (connect(m_socket, reinterpret_cast<struct sockaddr const*>(&saun), sizeof(struct sockaddr_un)) < 0)
{
#if defined(_WIN32)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this inside the else-part of the global if defined(_WIN32)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's true.

@axic axic force-pushed the test-close-failure branch from fd2e126 to 362615c Compare October 19, 2017 10:13
@axic
Copy link
Contributor Author

axic commented Oct 19, 2017

@chriseth can this be merged?

@chriseth chriseth merged commit 892c3ef into develop Oct 19, 2017
@axic axic deleted the test-close-failure branch October 19, 2017 11:34
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.

2 participants