Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
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
Stefane Fermigier
neo
Commits
98b6210c
Commit
98b6210c
authored
Mar 16, 2012
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not send error on closed connection.
parent
300e2023
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
15 deletions
+20
-15
neo/lib/handler.py
neo/lib/handler.py
+20
-15
No files found.
neo/lib/handler.py
View file @
98b6210c
...
@@ -54,22 +54,27 @@ class EventHandler(object):
...
@@ -54,22 +54,27 @@ class EventHandler(object):
args
=
packet
.
decode
()
or
()
args
=
packet
.
decode
()
or
()
method
(
conn
,
*
args
,
**
kw
)
method
(
conn
,
*
args
,
**
kw
)
except
UnexpectedPacketError
,
e
:
except
UnexpectedPacketError
,
e
:
if
not
conn
.
isClosed
():
self
.
__unexpectedPacket
(
conn
,
packet
,
*
e
.
args
)
self
.
__unexpectedPacket
(
conn
,
packet
,
*
e
.
args
)
except
PacketMalformedError
:
except
PacketMalformedError
:
if
not
conn
.
isClosed
():
neo
.
lib
.
logging
.
error
(
'malformed packet from %r'
,
conn
)
neo
.
lib
.
logging
.
error
(
'malformed packet from %r'
,
conn
)
conn
.
notify
(
Packets
.
Notify
(
'Malformed packet: %r'
%
(
packet
,
)))
conn
.
notify
(
Packets
.
Notify
(
'Malformed packet: %r'
%
(
packet
,
)))
conn
.
abort
()
conn
.
abort
()
# self.peerBroken(conn)
# self.peerBroken(conn)
except
BrokenNodeDisallowedError
:
except
BrokenNodeDisallowedError
:
if
not
conn
.
isClosed
():
conn
.
answer
(
Errors
.
BrokenNode
(
'go away'
))
conn
.
answer
(
Errors
.
BrokenNode
(
'go away'
))
conn
.
abort
()
conn
.
abort
()
except
NotReadyError
,
message
:
except
NotReadyError
,
message
:
if
not
conn
.
isClosed
():
if
not
message
.
args
:
if
not
message
.
args
:
message
=
'Retry Later'
message
=
'Retry Later'
message
=
str
(
message
)
message
=
str
(
message
)
conn
.
answer
(
Errors
.
NotReady
(
message
))
conn
.
answer
(
Errors
.
NotReady
(
message
))
conn
.
abort
()
conn
.
abort
()
except
ProtocolError
,
message
:
except
ProtocolError
,
message
:
if
not
conn
.
isClosed
():
message
=
str
(
message
)
message
=
str
(
message
)
conn
.
answer
(
Errors
.
ProtocolError
(
message
))
conn
.
answer
(
Errors
.
ProtocolError
(
message
))
conn
.
abort
()
conn
.
abort
()
...
...
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