Software /
code /
verse
Diff
plugins/disco.lua @ 172:1a32e9ae79d0
plugins.disco: Fix disco_local_services() to call callback with empty array in case of disco error
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 30 Dec 2010 20:19:47 +0000 |
parent | 167:a2ae7a9d360f |
child | 175:4d2a5d02fdfa |
line wrap: on
line diff
--- a/plugins/disco.lua Thu Dec 30 20:18:47 2010 +0000 +++ b/plugins/disco.lua Thu Dec 30 20:19:47 2010 +0000 @@ -160,6 +160,9 @@ function stream:disco_local_services(callback) self:disco_items(self.host, nil, function (items) + if not items then + return callback({}); + end local n_items = 0; local function item_callback() n_items = n_items - 1;