Commit 9ace1f9
authored
Fix SIGSEGV when closing SSL async socket while sending/receiving (#24795)
Async SSL socket SIGSEGV's sometimes when calling socket.close() while
send/recv. The issue was found here
nitely/nim-hyperx#59.
Possibly related: #24024
This can occur when closing the socket while sending or receiving,
because `socket.sslHandle` is freed. The sigsegv can also occur on calls
that require `socket.bioIn` or `socket.bioOut` because those use
`socket.sslHandle` internally. This PR checks sslHandle is set before
doing any operation that requires it.1 parent 1d32607 commit 9ace1f9
1 file changed
+13
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
210 | 213 | | |
211 | 214 | | |
212 | 215 | | |
| |||
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| 233 | + | |
| 234 | + | |
230 | 235 | | |
231 | 236 | | |
232 | 237 | | |
| |||
246 | 251 | | |
247 | 252 | | |
248 | 253 | | |
| 254 | + | |
| 255 | + | |
249 | 256 | | |
250 | 257 | | |
251 | 258 | | |
| |||
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
| 272 | + | |
| 273 | + | |
265 | 274 | | |
266 | 275 | | |
267 | 276 | | |
| |||
306 | 315 | | |
307 | 316 | | |
308 | 317 | | |
| 318 | + | |
| 319 | + | |
309 | 320 | | |
310 | 321 | | |
311 | 322 | | |
| |||
727 | 738 | | |
728 | 739 | | |
729 | 740 | | |
| 741 | + | |
| 742 | + | |
730 | 743 | | |
731 | 744 | | |
732 | 745 | | |
| |||
0 commit comments