Merge branch 'fix-migrate-tauri2-errors'
* fix-migrate-tauri2-errors: (288 commits) # Conflicts: # .github/ISSUE_TEMPLATE/bug_report.yml
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user