We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e7f9521 commit 8e3bc94Copy full SHA for 8e3bc94
drivers/SmartThings/sonos/src/api/sonos_connection.lua
@@ -259,7 +259,9 @@ local function _oauth_reconnect_task(sonos_conn)
259
260
if unauthorized then
261
sonos_conn.driver:alert_unauthorized()
262
- local token, channel_error = token_receive_handle:receive()
+ local token, channel_error =
263
+ (token_receive_handle and token_receive_handle:receive()) or nil,
264
+ "no token receive handle"
265
if not token then
266
log.warn(string.format("Error requesting token: %s", channel_error))
267
local _, get_token_err = sonos_conn.driver:get_oauth_token()
0 commit comments