From 80203f29ad3ebac15c98d42702f44f6b775a77d8 Mon Sep 17 00:00:00 2001 From: Heds Simons Date: Thu, 6 Dec 2018 16:17:57 +0000 Subject: [PATCH] api: Ensure Supervisor API returns IP addresses The move from pure CoffeeScript to TypeScript has brought a few changes to the way transpiling happens. Previously, through serendipity, the way `startIPAddressUpdate` was called worked because of the binding convention pre-transpiling. However, with the move to TypeScript, this has altered and the assumption that a lack of parentheses would call the method before supplying a callback into the returned function is incorrect. The method must be specifically called first. Connects-to: #836 Change-type: patch Signed-off-by: Heds Simons --- src/device-state.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/device-state.coffee b/src/device-state.coffee index 0bc5a9ac..fea8405a 100644 --- a/src/device-state.coffee +++ b/src/device-state.coffee @@ -301,7 +301,7 @@ module.exports = class DeviceState extends EventEmitter if changedConfig.connectivityCheckEnabled? network.enableConnectivityCheck(changedConfig.connectivityCheckEnabled) console.log('Starting periodic check for IP addresses') - network.startIPAddressUpdate (addresses) => + network.startIPAddressUpdate() (addresses) => @reportCurrentState( ip_address: addresses.join(' ') )