fix: 修复配额说明重复和undefined问题
- 在editStorageForm中初始化oss_storage_quota_value和oss_quota_unit - 删除重复的旧配额说明块,保留新的当前配额设置显示 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
36
backend/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js
generated
vendored
Normal file
36
backend/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import { timing } from "./timing";
|
||||
const DEFER_EVENT_LISTENER_TIME = 1000;
|
||||
export const setConnectionTimeout = (request, reject, timeoutInMs = 0) => {
|
||||
if (!timeoutInMs) {
|
||||
return -1;
|
||||
}
|
||||
const registerTimeout = (offset) => {
|
||||
const timeoutId = timing.setTimeout(() => {
|
||||
request.destroy();
|
||||
reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), {
|
||||
name: "TimeoutError",
|
||||
}));
|
||||
}, timeoutInMs - offset);
|
||||
const doWithSocket = (socket) => {
|
||||
if (socket?.connecting) {
|
||||
socket.on("connect", () => {
|
||||
timing.clearTimeout(timeoutId);
|
||||
});
|
||||
}
|
||||
else {
|
||||
timing.clearTimeout(timeoutId);
|
||||
}
|
||||
};
|
||||
if (request.socket) {
|
||||
doWithSocket(request.socket);
|
||||
}
|
||||
else {
|
||||
request.on("socket", doWithSocket);
|
||||
}
|
||||
};
|
||||
if (timeoutInMs < 2000) {
|
||||
registerTimeout(0);
|
||||
return 0;
|
||||
}
|
||||
return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);
|
||||
};
|
||||
Reference in New Issue
Block a user