Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
8c125eb4
Commit
8c125eb4
authored
Aug 05, 2015
by
Yury Selivanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
asyncio: Make sure BaseException is re-raised in SSLProtocol
parent
3fc0f2d2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
Lib/asyncio/sslproto.py
Lib/asyncio/sslproto.py
+6
-1
No files found.
Lib/asyncio/sslproto.py
View file @
8c125eb4
...
...
@@ -613,7 +613,8 @@ class SSLProtocol(protocols.Protocol):
if
data
:
ssldata
,
offset
=
self
.
_sslpipe
.
feed_appdata
(
data
,
offset
)
elif
offset
:
ssldata
=
self
.
_sslpipe
.
do_handshake
(
self
.
_on_handshake_complete
)
ssldata
=
self
.
_sslpipe
.
do_handshake
(
self
.
_on_handshake_complete
)
offset
=
1
else
:
ssldata
=
self
.
_sslpipe
.
shutdown
(
self
.
_finalize
)
...
...
@@ -637,9 +638,13 @@ class SSLProtocol(protocols.Protocol):
self
.
_write_buffer_size
-=
len
(
data
)
except
BaseException
as
exc
:
if
self
.
_in_handshake
:
# BaseExceptions will be re-raised in _on_handshake_complete.
self
.
_on_handshake_complete
(
exc
)
else
:
self
.
_fatal_error
(
exc
,
'Fatal error on SSL transport'
)
if
not
isinstance
(
exc
,
Exception
):
# BaseException
raise
def
_fatal_error
(
self
,
exc
,
message
=
'Fatal error on transport'
):
# Should be called from exception handler only.
...
...
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