Commit 4fab0e2
committed
fix(socket): do not start a connect once a stop has been requested
A stop that arrived while one address was being tried did not end the
connect. The loop went on to the remaining addresses and sent each of them a
SYN, and when all had failed the manual DNS fallback ran, which does not look
at the token and waits up to 2.5 s for each nameserver.
Check the token before each connect attempt, before each lookup and before
the fallback. A lookup that has already started still cannot be interrupted.1 parent f96897e commit 4fab0e2
1 file changed
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
| 114 | + | |
113 | 115 | | |
114 | 116 | | |
115 | 117 | | |
| |||
180 | 182 | | |
181 | 183 | | |
182 | 184 | | |
| 185 | + | |
183 | 186 | | |
184 | 187 | | |
185 | 188 | | |
| |||
0 commit comments