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
465da7b1
Commit
465da7b1
authored
Oct 26, 2010
by
Dhammika Pathirana
Committed by
Martin Sustrik
Oct 26, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
drop connection requests with duplicate peer identity
Signed-off-by:
Dhammika Pathirana
<
dhammika@gmail.com
>
parent
401986e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
session.cpp
src/session.cpp
+7
-2
zmq_init.hpp
src/zmq_init.hpp
+1
-1
No files found.
src/session.cpp
View file @
465da7b1
...
@@ -231,6 +231,13 @@ void zmq::session_t::process_attach (i_engine *engine_,
...
@@ -231,6 +231,13 @@ void zmq::session_t::process_attach (i_engine *engine_,
return
;
return
;
}
}
// If the session already has an engine attached, destroy new one.
// Note new engine is not plugged in yet, we don't have to unplug it.
if
(
engine
)
{
delete
engine_
;
return
;
}
// Check whether the required pipes already exist. If not so, we'll
// Check whether the required pipes already exist. If not so, we'll
// create them and bind them to the socket object.
// create them and bind them to the socket object.
if
(
!
pipes_attached
)
{
if
(
!
pipes_attached
)
{
...
@@ -257,8 +264,6 @@ void zmq::session_t::process_attach (i_engine *engine_,
...
@@ -257,8 +264,6 @@ void zmq::session_t::process_attach (i_engine *engine_,
}
}
// Plug in the engine.
// Plug in the engine.
zmq_assert
(
!
engine
);
zmq_assert
(
engine_
);
engine
=
engine_
;
engine
=
engine_
;
engine
->
plug
(
io_thread
,
this
);
engine
->
plug
(
io_thread
,
this
);
...
...
src/zmq_init.hpp
View file @
465da7b1
...
@@ -55,7 +55,7 @@ namespace zmq
...
@@ -55,7 +55,7 @@ namespace zmq
void
process_plug
();
void
process_plug
();
void
process_unplug
();
void
process_unplug
();
// Associated wi
t
e-protocol engine.
// Associated wi
r
e-protocol engine.
i_engine
*
engine
;
i_engine
*
engine
;
// True if our own identity was already sent to the peer.
// True if our own identity was already sent to the peer.
...
...
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