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
Levin Zimmermann
neoppod
Commits
0a3dba8b
Commit
0a3dba8b
authored
Apr 24, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use existing generic way to ignore AcceptIdentification on closed connections
parent
9d7f9795
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
6 deletions
+1
-6
neo/lib/handler.py
neo/lib/handler.py
+0
-5
neo/lib/protocol.py
neo/lib/protocol.py
+1
-1
No files found.
neo/lib/handler.py
View file @
0a3dba8b
...
...
@@ -152,11 +152,6 @@ class EventHandler(object):
acceptIdentification
=
self
.
_acceptIdentification
except
AttributeError
:
raise
UnexpectedPacketError
(
'no handler found'
)
if
conn
.
isClosed
():
# acceptIdentification received on a closed (probably aborted,
# actually) connection. Reject any further packet as unexpected.
conn
.
setHandler
(
EventHandler
(
self
.
app
))
return
node
=
self
.
app
.
nm
.
getByAddress
(
conn
.
getAddress
())
assert
node
.
getConnection
()
is
conn
,
(
node
.
getConnection
(),
conn
)
if
node
.
getType
()
==
node_type
:
...
...
neo/lib/protocol.py
View file @
0a3dba8b
...
...
@@ -1673,7 +1673,7 @@ class Packets(dict):
Error
=
register
(
Error
)
RequestIdentification
,
AcceptIdentification
=
register
(
RequestIdentification
)
RequestIdentification
,
ignore_when_closed
=
True
)
# Code of RequestIdentification packet must never change so that 2
# incompatible nodes can reject themselves gracefully (i.e. comparing
# protocol versions) instead of raising PacketMalformedError.
...
...
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