Commit 252b52c
committed
Fix hang when using eventlet and ssl
The eventlet read loop runs select before each recv call. This will
fail because recv() on an ssl socket might read more data than
requested from the underlying socket in order to have enough context
for decryption. These extra bytes would be returned by the next recv
on the ssl socket, but are not known to underlying socket so select
will hang.
It is my understanding that eventlet implements blocking IO by using
poll under the hood and yielding, so the select should not be
necessary at all1 parent 2f359cd commit 252b52c
1 file changed
Lines changed: 10 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
22 | 23 | | |
23 | | - | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
41 | 42 | | |
42 | 43 | | |
43 | 44 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
142 | 142 | | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | 143 | | |
153 | 144 | | |
154 | 145 | | |
155 | 146 | | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
161 | 153 | | |
162 | 154 | | |
163 | 155 | | |
| |||
0 commit comments