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
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
neoppod
Commits
e2e9c2f5
Commit
e2e9c2f5
authored
Apr 25, 2017
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use ProtocolError instead of Notify for unexpected answers, and drop Notify
parent
b27db46f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 addition
and
14 deletions
+1
-14
neo/lib/connection.py
neo/lib/connection.py
+1
-1
neo/lib/handler.py
neo/lib/handler.py
+0
-3
neo/lib/protocol.py
neo/lib/protocol.py
+0
-10
No files found.
neo/lib/connection.py
View file @
e2e9c2f5
...
...
@@ -138,7 +138,7 @@ class HandlerSwitcher(object):
else
:
logging
.
error
(
'Unexpected answer %r in %r'
,
packet
,
connection
)
if
not
connection
.
isClosed
():
connection
.
send
(
Packets
.
Notify
(
connection
.
answer
(
Errors
.
ProtocolError
(
'Unexpected answer: %r'
%
packet
))
connection
.
abort
()
finally
:
...
...
neo/lib/handler.py
View file @
e2e9c2f5
...
...
@@ -198,9 +198,6 @@ class EventHandler(object):
# to test/maintain underlying connection.
pass
def
notify
(
self
,
conn
,
message
):
logging
.
warning
(
'notification from %r: %s'
,
conn
,
message
)
def
closeClient
(
self
,
conn
):
conn
.
server
=
False
if
not
conn
.
client
:
...
...
neo/lib/protocol.py
View file @
e2e9c2f5
...
...
@@ -663,14 +663,6 @@ PFOidList = PList('oid_list',
# packets definition
class
Notify
(
Packet
):
"""
General purpose notification (remote logging)
"""
_fmt
=
PStruct
(
'notify'
,
PString
(
'message'
),
)
class
Error
(
Packet
):
"""
Error is a special type of message, because this can be sent against
...
...
@@ -1677,8 +1669,6 @@ class Packets(dict):
Ping
)
CloseClient
=
register
(
CloseClient
)
Notify
=
register
(
Notify
)
AskPrimary
,
AnswerPrimary
=
register
(
PrimaryMaster
)
NotPrimaryMaster
=
register
(
...
...
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