mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
fix freeSocket check
This commit is contained in:
@@ -267,7 +267,7 @@ function generate_payload(query, variables) {
|
|||||||
|
|
||||||
async function request_with_retries(method, attempts = 10) {
|
async function request_with_retries(method, attempts = 10) {
|
||||||
for (let i = 0; i < attempts; i++) {
|
for (let i = 0; i < attempts; i++) {
|
||||||
var ResponseHasFreeSocket;
|
var ResponseHasFreeSocket = false;
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const response = await method();
|
const response = await method();
|
||||||
@@ -287,7 +287,7 @@ async function request_with_retries(method, attempts = 10) {
|
|||||||
if (typeof value === 'object' && value !== null) {
|
if (typeof value === 'object' && value !== null) {
|
||||||
return Array.isArray(value) ? value : { ...value };
|
return Array.isArray(value) ? value : { ...value };
|
||||||
}
|
}
|
||||||
if (key === "Free Sockets" && value.length) {
|
if (key === "freeSockets" && value.length) {
|
||||||
ResponseHasFreeSocket = true;
|
ResponseHasFreeSocket = true;
|
||||||
}
|
}
|
||||||
if (key === "Cookie" || key === "set-cookie" || key === "Set-Cookie") {
|
if (key === "Cookie" || key === "set-cookie" || key === "Set-Cookie") {
|
||||||
@@ -337,7 +337,7 @@ async function request_with_retries(method, attempts = 10) {
|
|||||||
if (key === "Cookie") {
|
if (key === "Cookie") {
|
||||||
return "[COOKIE REDACTED BY ST CODE]"
|
return "[COOKIE REDACTED BY ST CODE]"
|
||||||
}
|
}
|
||||||
if (key === "Free Sockets" && value.length) {
|
if (key === "freeSockets" && value.length) {
|
||||||
ResponseHasFreeSocket = true;
|
ResponseHasFreeSocket = true;
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
Reference in New Issue
Block a user