Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Matrix
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Operate
Environments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Matrix
Commits
2e7a94c3
Commit
2e7a94c3
authored
6 years ago
by
Will Hunt
Browse files
Options
Downloads
Patches
Plain Diff
Don't abortConnection() if the transport connection has already closed.
parent
7dcbcca6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/http/endpoint.py
+8
-3
8 additions, 3 deletions
synapse/http/endpoint.py
with
8 additions
and
3 deletions
synapse/http/endpoint.py
+
8
−
3
View file @
2e7a94c3
...
...
@@ -113,10 +113,15 @@ class _WrappedConnection(object):
if
time
.
time
()
-
self
.
last_request
>=
2.5
*
60
:
self
.
abort
()
# Abort the underlying TLS connection. The abort() method calls
# loseConnection() on the
underlying
TLS connection which tries to
# loseConnection() on the TLS connection which tries to
# shutdown the connection cleanly. We call abortConnection()
# since that will promptly close the underlying TCP connection.
self
.
transport
.
abortConnection
()
# since that will promptly close the TLS connection.
#
# In Twisted >18.4; the TLS connection will be None if it has closed
# which will make abortConnection() throw. Check that the TLS connection
# is not None before trying to close it.
if
self
.
transport
.
getHandle
()
is
not
None
:
self
.
transport
.
abortConnection
()
def
request
(
self
,
request
):
self
.
last_request
=
time
.
time
()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment