Skip to content

Commit

Permalink
fixing disconnect behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
jdanielnd committed Dec 21, 2023
1 parent c5aa4df commit c336af5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/aerowinx-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class AerowinxConnection {
}

close() {
this.client.end();
this.client.resetAndDestroy();
console.log('Connection manually closed');
}

Expand Down Expand Up @@ -136,7 +136,7 @@ const createAerowinxConnection = (win: BrowserWindow) => {
ipcMain.on('aerowinx:connect', connectListener);

const closeListener = () => {
aerowinxSocket.destroy();
aerowinxSocket.close();
}
ipcMain.on('aerowinx:close', closeListener);

Expand Down

0 comments on commit c336af5

Please sign in to comment.