Merge branch 'fix-migrate-tauri2-errors'

* fix-migrate-tauri2-errors: (288 commits)

# Conflicts:
#	.github/ISSUE_TEMPLATE/bug_report.yml
This commit is contained in:
huzibaca
2024-11-24 00:14:46 +08:00
123 changed files with 8721 additions and 5789 deletions

View File

@@ -6,7 +6,7 @@ import Sockette, { type SocketteOptions } from "sockette";
export const createSockette = (
url: string,
opt: SocketteOptions,
maxError = 10
maxError = 10,
) => {
let remainRetryCount = maxError;
@@ -23,8 +23,10 @@ export const createSockette = (
remainRetryCount -= 1;
if (remainRetryCount >= 0) {
this.close();
this.reconnect();
if (this instanceof Sockette) {
this.close();
this.reconnect();
}
} else {
opt.onerror?.call(this, ev);
}