Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
name: Build & Deploy to NPM

# Only run this job if initiator is not the Homey Github Actions Bot to prevent loops
if: github.actor != 'HomeyGithubActionsBot' && github.ref == 'refs/heads/production'
if: github.actor != 'homey-bot' && github.ref == 'refs/heads/production'

runs-on: ubuntu-latest
steps:
Expand Down
12 changes: 12 additions & 0 deletions remote/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,18 @@ class DeviceHandleProxy extends Duplex {
static get constants() {
return CONSTANTS;
}

/**
* Disconnect the remote socket.io connection.
* Call this when done using all device handles to allow the process to exit.
*/
static async disconnect() {
if (server) {
const serv = await server;
serv.disconnect();
server = null;
}
}
}

DeviceHandleProxy.prototype.__init = makeRemoteFunc('create_handle');
Expand Down