arRPC: increase connection timeout to 5s (#3680)

Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
sadan4 2025-09-28 17:34:23 -04:00 committed by GitHub
parent f040133412
commit 8943c90cb0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -79,7 +79,7 @@ export default definePlugin({
ws.onmessage = this.handleEvent;
const connectionSuccessful = await new Promise(res => setTimeout(() => res(ws.readyState === WebSocket.OPEN), 1000)); // check if open after 1s
const connectionSuccessful = await new Promise(res => setTimeout(() => res(ws.readyState === WebSocket.OPEN), 5000)); // check if open after 5s
if (!connectionSuccessful) {
showNotice("Failed to connect to arRPC, is it running?", "Retry", () => { // show notice about failure to connect, with retry/ignore
popNotice();