Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
88ac6318
Commit
88ac6318
authored
Apr 20, 2015
by
Richard Newton
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1341 from hintjens/master
Problem: issue #1144, 1377
parents
9a4c4da2
594e3dcc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
signaler.cpp
src/signaler.cpp
+8
-5
test_disconnect_inproc.cpp
tests/test_disconnect_inproc.cpp
+1
-2
No files found.
src/signaler.cpp
View file @
88ac6318
...
...
@@ -132,11 +132,14 @@ zmq::signaler_t::~signaler_t ()
const
struct
linger
so_linger
=
{
1
,
0
};
int
rc
=
setsockopt
(
w
,
SOL_SOCKET
,
SO_LINGER
,
(
const
char
*
)
&
so_linger
,
sizeof
so_linger
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
rc
=
closesocket
(
w
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
rc
=
closesocket
(
r
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
// Only check shutdown if WSASTARTUP was previously done
if
(
rc
==
0
||
WSAGetLastError
()
!=
WSANOTINITIALISED
)
{
wsa_assert
(
rc
!=
SOCKET_ERROR
);
rc
=
closesocket
(
w
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
rc
=
closesocket
(
r
);
wsa_assert
(
rc
!=
SOCKET_ERROR
);
}
#else
int
rc
=
close_wait_ms
(
w
);
errno_assert
(
rc
==
0
);
...
...
tests/test_disconnect_inproc.cpp
View file @
88ac6318
...
...
@@ -94,11 +94,10 @@ int main(int, char**) {
}
if
(
iteration
==
1
)
{
zmq_connect
(
subSocket
,
"inproc://someInProcDescriptor"
)
&&
printf
(
"zmq_connect: %s
\n
"
,
zmq_strerror
(
errno
));
//zmq_connect(subSocket, "tcp://127.0.0.1:30010") && printf("zmq_connect: %s\n", zmq_strerror(errno)
);
msleep
(
SETTLE_TIME
);
}
if
(
iteration
==
4
)
{
zmq_disconnect
(
subSocket
,
"inproc://someInProcDescriptor"
)
&&
printf
(
"zmq_disconnect(%d): %s
\n
"
,
errno
,
zmq_strerror
(
errno
));
//zmq_disconnect(subSocket, "tcp://127.0.0.1:30010") && printf("zmq_disconnect: %s\n", zmq_strerror(errno));
}
if
(
iteration
>
4
&&
rc
==
0
)
break
;
...
...
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