Skip to content
This repository was archived by the owner on Feb 13, 2023. It is now read-only.

Commit a126b3b

Browse files
committed
Release 1.2.1
* Fixes hang when force reconnecting
1 parent 81a11cd commit a126b3b

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

index.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ ipcMain.on('updateLocation', (event, arg) => {
106106
event.returnValue = true;
107107
});
108108

109-
ipcMain.on('reconnect', () => {
109+
ipcMain.on('reconnect', event => {
110110
forceReconnect();
111+
event.returnValue = true;
111112
});
112113

113114
app.on('ready', () => {
@@ -225,7 +226,11 @@ function connect() {
225226

226227
function forceReconnect() {
227228
forced = true;
228-
rpcClient.destroy();
229+
try {
230+
rpcClient.destroy();
231+
} catch {
232+
connect();
233+
}
229234
}
230235

231236
connect();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "perseverancerpc",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "A quick discord RPC application for tracking perseverance landing.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)