Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
defunctec
crown-core
Commits
ec93a0e2
Commit
ec93a0e2
authored
13 years ago
by
Venkatesh Srinivas
Committed by
Jeff Garzik
13 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Test for SO_NOSIGPIPE rather than assuming all BSDs support it.
Signed-off-by:
Jeff Garzik
<
jgarzik@exmulti.com
>
parent
9f0ac169
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/net.cpp
+2
-2
src/net.cpp
with
2 additions
and
2 deletions
+2
-2
src/net.cpp
View file @
ec93a0e2
...
...
@@ -98,7 +98,7 @@ bool ConnectSocket(const CAddress& addrConnect, SOCKET& hSocketRet, int nTimeout
SOCKET
hSocket
=
socket
(
AF_INET
,
SOCK_STREAM
,
IPPROTO_TCP
);
if
(
hSocket
==
INVALID_SOCKET
)
return
false
;
#ifdef
BSD
#ifdef
SO_NOSIGPIPE
int
set
=
1
;
setsockopt
(
hSocket
,
SOL_SOCKET
,
SO_NOSIGPIPE
,
(
void
*
)
&
set
,
sizeof
(
int
));
#endif
...
...
@@ -1584,7 +1584,7 @@ bool BindListenPort(string& strError)
return
false
;
}
#ifdef
BSD
#ifdef
SO_NOSIGPIPE
// Different way of disabling SIGPIPE on BSD
setsockopt
(
hListenSocket
,
SOL_SOCKET
,
SO_NOSIGPIPE
,
(
void
*
)
&
nOne
,
sizeof
(
int
));
#endif
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help