Commit 71077b8
authored
Fix segmenatation fault if connection is closed during handshake (#399)
Fixes #398
### Motivation
There is an implicit requirement for the `async_handshake` API that
before it's done, the `socket` and `ssl::stream` objects must exist.
Otherwise segmenatation fault might happen.
### Modifications
Capture `socket_` and `tlsSocket_` in the handshake callback. It can be
verified by modifying the code according to #398 and rerun the test.1 parent 289c930 commit 71077b8
1 file changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
460 | 464 | | |
461 | 465 | | |
462 | 466 | | |
| |||
0 commit comments