Commit c81a497
committed
Fix ineffective cancel() when stuck in perfdata writer handshake
Sometimes, the `stream->lowest_layer().cancel()` in
`PerfdataWriterConnection::Disconnect()` is ineffective when
`EnsureConnected()` is stuck in a handshake. Supposedly there
is a window where the coroutine has already been suspended, but
the handler for the SSL operations has not yet been queued. If
the cancel hits in this window, it is entirely ignored.
This is fixed by issuing a socket close unless the client is fully
connected.1 parent a12282e commit c81a497
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | | - | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
163 | | - | |
| 168 | + | |
164 | 169 | | |
165 | 170 | | |
166 | 171 | | |
| |||
0 commit comments