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
9d8623b2
Commit
9d8623b2
authored
Feb 17, 2010
by
Martin Sustrik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZMQII-76: Bug in how replies are handled when the REQ endpoint goes away
parent
33cb20a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
8 deletions
+14
-8
rep.cpp
src/rep.cpp
+14
-8
No files found.
src/rep.cpp
View file @
9d8623b2
...
...
@@ -85,11 +85,11 @@ void zmq::rep_t::xdetach_outpipe (class writer_t *pipe_)
out_pipes_t
::
size_type
index
=
out_pipes
.
index
(
pipe_
);
//
TODO:
If the connection we've got the request from disconnects,
// there's nowhere to send the reply.
DLQ?
if
(
waiting_for_reply
&&
pipe_
==
reply_pipe
)
{
zmq_assert
(
false
);
}
// If the connection we've got the request from disconnects,
// there's nowhere to send the reply.
Forget about the reply pipe.
// Once the reply is sent it will be dropped.
if
(
waiting_for_reply
&&
pipe_
==
reply_pipe
)
reply_pipe
=
NULL
;
// If corresponding inpipe is still in place simply nullify the pointer
// to the outpipe.
...
...
@@ -146,9 +146,15 @@ int zmq::rep_t::xsend (zmq_msg_t *msg_, int flags_)
// overloads the buffer, connection should be torn down.
zmq_assert
(
reply_pipe
->
check_write
(
zmq_msg_size
(
msg_
)));
// Push message to the selected pipe.
reply_pipe
->
write
(
msg_
);
reply_pipe
->
flush
();
// Push message to the selected pipe. If requester have disconnected
// in the meantime, drop the reply.
if
(
reply_pipe
)
{
reply_pipe
->
write
(
msg_
);
reply_pipe
->
flush
();
}
else
{
zmq_close
(
msg_
);
}
waiting_for_reply
=
false
;
reply_pipe
=
NULL
;
...
...
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