# HG changeset patch # User Matthew Wild # Date 1293740387 0 # Node ID 1a32e9ae79d0920de80ef6513e392b8fe17a47b8 # Parent 741f5311d30c3425d29efdc57794ea0d14eaab51 plugins.disco: Fix disco_local_services() to call callback with empty array in case of disco error diff -r 741f5311d30c -r 1a32e9ae79d0 plugins/disco.lua --- 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;