Download Goat-Bot-V2/node_modules/@aws-sdk/node-http-handler/dist-cjs/set-socket-timeout.js from sweet2004/mitaaaa: direct link, hf CLI and curl.
- Browser
- Download file 420 Bytes
-
https://huggingface.co/spaces/sweet2004/mitaaaa/resolve/main/Goat-Bot-V2/node_modules/%40aws-sdk/node-http-handler/dist-cjs/set-socket-timeout.js
- Command line
-
hf download hf://spaces/sweet2004/mitaaaa/Goat-Bot-V2/node_modules/@aws-sdk/node-http-handler/dist-cjs/set-socket-timeout.js
-
curl -L -o set-socket-timeout.js https://huggingface.co/spaces/sweet2004/mitaaaa/resolve/main/Goat-Bot-V2/node_modules/%40aws-sdk/node-http-handler/dist-cjs/set-socket-timeout.js
420 Bytes
| ; | |
| Object.defineProperty(exports, "__esModule", { value: true }); | |
| exports.setSocketTimeout = void 0; | |
| const setSocketTimeout = (request, reject, timeoutInMs = 0) => { | |
| request.setTimeout(timeoutInMs, () => { | |
| request.destroy(); | |
| reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: "TimeoutError" })); | |
| }); | |
| }; | |
| exports.setSocketTimeout = setSocketTimeout; | |