Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iliya Manolov
neoppod
Commits
3ca8ea08
Commit
3ca8ea08
authored
Mar 01, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deprecate connection's getHandler.
parent
b181b08b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
neo/lib/connection.py
neo/lib/connection.py
+1
-0
neo/lib/node.py
neo/lib/node.py
+7
-0
No files found.
neo/lib/connection.py
View file @
3ca8ea08
...
...
@@ -258,6 +258,7 @@ class BaseConnection(object):
event_manager
.
register
(
self
)
event_manager
.
addReader
(
self
)
# XXX: do not use getHandler
getHandler
=
property
(
lambda
self
:
self
.
_handlers
.
getHandler
)
getLastHandler
=
property
(
lambda
self
:
self
.
_handlers
.
getLastHandler
)
isPending
=
property
(
lambda
self
:
self
.
_handlers
.
isPending
)
...
...
neo/lib/node.py
View file @
3ca8ea08
...
...
@@ -117,6 +117,13 @@ class Node(object):
assert
force
is
not
None
,
\
attributeTracker
.
whoSet
(
self
,
'_connection'
)
# The test on peer_id is there to protect against buggy nodes.
# XXX: handler comparison does not cover all cases: there may
# be a pending handler change, which won't be detected, or a future
# handler change which is not prevented. Complete implementation
# should allow different handlers for each connection direction,
# with in-packets client/server indicators to decide which handler
# (server-ish or client-ish) to use. There is currently no need for
# the full-fledged functionality, and it is simpler this way.
if
not
force
or
conn
.
getPeerId
()
is
not
None
or
\
type
(
conn
.
getHandler
())
is
not
type
(
connection
.
getHandler
()):
raise
ProtocolError
(
"already connected"
)
...
...
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