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
72b8a196
Commit
72b8a196
authored
Aug 14, 2014
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1163 from hurtonm/master
Code cleanup
parents
b817f3c6
f550d66a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
pipe.cpp
src/pipe.cpp
+9
-9
pipe.hpp
src/pipe.hpp
+1
-1
No files found.
src/pipe.cpp
View file @
72b8a196
...
...
@@ -275,43 +275,43 @@ void zmq::pipe_t::process_hiccup (void *pipe_)
void
zmq
::
pipe_t
::
process_pipe_term
()
{
zmq_assert
(
state
==
active
||
state
==
delimiter_received
||
state
==
term_req_sent1
);
// This is the simple case of peer-induced termination. If there are no
// more pending messages to read, or if the pipe was configured to drop
// pending messages, we can move directly to the term_ack_sent state.
// Otherwise we'll hang up in waiting_for_delimiter state till all
// pending messages are read.
if
(
state
==
active
)
{
if
(
!
delay
)
{
if
(
delay
)
state
=
waiting_for_delimiter
;
else
{
state
=
term_ack_sent
;
outpipe
=
NULL
;
send_pipe_term_ack
(
peer
);
}
else
state
=
waiting_for_delimiter
;
return
;
}
// Delimiter happened to arrive before the term command. Now we have the
// term command as well, so we can move straight to term_ack_sent state.
else
if
(
state
==
delimiter_received
)
{
state
=
term_ack_sent
;
outpipe
=
NULL
;
send_pipe_term_ack
(
peer
);
return
;
}
// This is the case where both ends of the pipe are closed in parallel.
// We simply reply to the request by ack and continue waiting for our
// own ack.
else
if
(
state
==
term_req_sent1
)
{
state
=
term_req_sent2
;
outpipe
=
NULL
;
send_pipe_term_ack
(
peer
);
return
;
}
// pipe_term is invalid in other states.
zmq_assert
(
false
);
}
void
zmq
::
pipe_t
::
process_pipe_term_ack
()
...
...
src/pipe.hpp
View file @
72b8a196
...
...
@@ -214,7 +214,7 @@ namespace zmq
// Computes appropriate low watermark from the given high watermark.
static
int
compute_lwm
(
int
hwm_
);
bool
conflate
;
const
bool
conflate
;
// Disable copying.
pipe_t
(
const
pipe_t
&
);
...
...
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