Skip to content

Commit c529c4b

Browse files
committed
fix: timeout error
1 parent fab235f commit c529c4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function impl (req, resOrSocket, headOrNil, {
102102
}
103103

104104
if (timeout) {
105-
req.setTimeout(timeout, () => onError(new createError.RequestTimeout()))
105+
req.setTimeout(timeout, () => onError(createError('request timeout', null, 408)))
106106
}
107107

108108
if (resOrSocket instanceof net.Socket) {

0 commit comments

Comments
 (0)