summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-15 08:44:24 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-15 08:44:24 (GMT)
commitfe47e66792dd32420c705796bc7e3445b0fc6292 (patch)
treee748b375814c7d3f85c634b5febee08d64bf8412
parent516aaa116a084b47c032f161bec75bf5eac94e30 (diff)
parent72bdefb0868771d360385da55750e8742dab3e05 (diff)
downloadcpython-fe47e66792dd32420c705796bc7e3445b0fc6292.zip
cpython-fe47e66792dd32420c705796bc7e3445b0fc6292.tar.gz
cpython-fe47e66792dd32420c705796bc7e3445b0fc6292.tar.bz2
Merge 3.4 (asyncio)
-rw-r--r--Lib/asyncio/sslproto.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Lib/asyncio/sslproto.py b/Lib/asyncio/sslproto.py
index 541e252..c7fb4e7 100644
--- a/Lib/asyncio/sslproto.py
+++ b/Lib/asyncio/sslproto.py
@@ -572,8 +572,12 @@ class SSLProtocol(protocols.Protocol):
# wait until protocol.connection_made() has been called
self._waiter._set_result_unless_cancelled(None)
self._session_established = True
- # In case transport.write() was already called
- self._process_write_backlog()
+ # In case transport.write() was already called. Don't call
+ # immediatly _process_write_backlog(), but schedule it:
+ # _on_handshake_complete() can be called indirectly from
+ # _process_write_backlog(), and _process_write_backlog() is not
+ # reentrant.
+ self._loop.call_soon(self._process_write_backlog)
def _process_write_backlog(self):
# Try to make progress on the write backlog.