{{ message }}
Commit 435f3dd
http: attach error handler to socket synchronously in onSocket
Between onSocket and onSocketNT, the socket had no error handler,
meaning any errors emitted during that window (e.g. from a blocklist
check or custom lookup) would be unhandled even if the user had set up
a request error handler.
Fix this by attaching socketErrorListener synchronously in onSocket,
setting socket._httpMessage so the listener can forward errors to the
request. The _destroy path in onSocketNT is also guarded to prevent
double-firing if socketErrorListener already emitted the error.
Fixes: #48771
Refs: #61658
PR-URL: #61770
Refs: #48771
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent c8dac32 commit 435f3dd
3 files changed
Lines changed: 21 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1125 | 1125 | | |
1126 | 1126 | | |
1127 | 1127 | | |
1128 | | - | |
| 1128 | + | |
1129 | 1129 | | |
1130 | 1130 | | |
1131 | 1131 | | |
| |||
1135 | 1135 | | |
1136 | 1136 | | |
1137 | 1137 | | |
1138 | | - | |
| 1138 | + | |
1139 | 1139 | | |
1140 | 1140 | | |
1141 | 1141 | | |
| |||
1167 | 1167 | | |
1168 | 1168 | | |
1169 | 1169 | | |
1170 | | - | |
| 1170 | + | |
1171 | 1171 | | |
1172 | 1172 | | |
1173 | 1173 | | |
1174 | 1174 | | |
1175 | 1175 | | |
1176 | | - | |
1177 | | - | |
1178 | | - | |
1179 | | - | |
1180 | | - | |
1181 | | - | |
1182 | | - | |
1183 | | - | |
1184 | 1176 | | |
1185 | 1177 | | |
1186 | 1178 | | |
| |||
1194 | 1186 | | |
1195 | 1187 | | |
1196 | 1188 | | |
1197 | | - | |
| 1189 | + | |
1198 | 1190 | | |
1199 | 1191 | | |
1200 | 1192 | | |
1201 | | - | |
| 1193 | + | |
1202 | 1194 | | |
1203 | 1195 | | |
1204 | 1196 | | |
| |||

0 commit comments