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
c319b065
Commit
c319b065
authored
Jul 24, 2015
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove useless socket shutdown on close
shutdown is implicit because we don't duplicate sockets.
parent
19745e7c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
16 deletions
+0
-16
neo/lib/connection.py
neo/lib/connection.py
+0
-1
neo/lib/connector.py
neo/lib/connector.py
+0
-7
neo/tests/testConnection.py
neo/tests/testConnection.py
+0
-8
No files found.
neo/lib/connection.py
View file @
c319b065
...
...
@@ -275,7 +275,6 @@ class BaseConnection(object):
em
.
removeReader
(
self
)
em
.
removeWriter
(
self
)
em
.
unregister
(
self
)
self
.
connector
.
shutdown
()
self
.
connector
.
close
()
self
.
connector
=
None
self
.
aborted
=
False
...
...
neo/lib/connector.py
View file @
c319b065
...
...
@@ -105,13 +105,6 @@ class SocketConnector:
raise
ConnectorException
,
'getNewConnection failed: %s:%s'
%
\
(
err
,
errmsg
)
def
shutdown
(
self
):
# This may fail if the socket is not connected.
try
:
self
.
socket
.
shutdown
(
socket
.
SHUT_RDWR
)
except
socket
.
error
:
pass
def
receive
(
self
):
try
:
return
self
.
socket
.
recv
(
4096
)
...
...
neo/tests/testConnection.py
View file @
c319b065
...
...
@@ -79,9 +79,6 @@ class ConnectionTests(NeoUnitTestBase):
def
_checkWriterRemoved
(
self
,
n
=
1
):
self
.
assertEqual
(
len
(
self
.
em
.
mockGetNamedCalls
(
"removeWriter"
)),
n
)
def
_checkShutdown
(
self
,
n
=
1
):
self
.
assertEqual
(
len
(
self
.
connector
.
mockGetNamedCalls
(
"shutdown"
)),
n
)
def
_checkClose
(
self
,
n
=
1
):
self
.
assertEqual
(
len
(
self
.
connector
.
mockGetNamedCalls
(
"close"
)),
n
)
...
...
@@ -523,7 +520,6 @@ class ConnectionTests(NeoUnitTestBase):
self
.
assertTrue
(
bc
.
pending
())
self
.
_checkWriterRemoved
(
0
)
self
.
_checkReaderRemoved
(
0
)
self
.
_checkShutdown
(
0
)
self
.
_checkClose
(
0
)
finally
:
del
DoNothingConnector
.
send
...
...
@@ -550,7 +546,6 @@ class ConnectionTests(NeoUnitTestBase):
self
.
assertFalse
(
bc
.
pending
())
self
.
_checkWriterRemoved
(
1
)
self
.
_checkReaderRemoved
(
0
)
self
.
_checkShutdown
(
0
)
self
.
_checkClose
(
0
)
finally
:
del
DoNothingConnector
.
send
...
...
@@ -578,7 +573,6 @@ class ConnectionTests(NeoUnitTestBase):
self
.
assertFalse
(
bc
.
pending
())
self
.
_checkWriterRemoved
(
1
)
self
.
_checkReaderRemoved
(
1
)
self
.
_checkShutdown
(
1
)
self
.
_checkClose
(
1
)
finally
:
del
DoNothingConnector
.
send
...
...
@@ -610,7 +604,6 @@ class ConnectionTests(NeoUnitTestBase):
self
.
_checkUnregistered
(
0
)
self
.
_checkWriterRemoved
(
0
)
self
.
_checkReaderRemoved
(
0
)
self
.
_checkShutdown
(
0
)
self
.
_checkClose
(
0
)
finally
:
del
DoNothingConnector
.
receive
...
...
@@ -710,7 +703,6 @@ class ConnectionTests(NeoUnitTestBase):
self
.
_checkReaderAdded
(
1
)
self
.
_checkWriterRemoved
(
1
)
self
.
_checkReaderRemoved
(
0
)
self
.
_checkShutdown
(
0
)
self
.
_checkClose
(
0
)
finally
:
del
DoNothingConnector
.
send
...
...
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