mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-18 09:35:50 +00:00
Change to callback method
This commit is contained in:
parent
8552d0674f
commit
fd735e248f
2 changed files with 7 additions and 2 deletions
4
index.js
4
index.js
|
|
@ -30,9 +30,11 @@ module.exports = {
|
|||
query.options = options;
|
||||
activeQueries.push(query);
|
||||
|
||||
query.on('finished', function() {
|
||||
query.on('finished',function(state) {
|
||||
var i = activeQueries.indexOf(query);
|
||||
if(i >= 0) activeQueries.splice(i, 1);
|
||||
|
||||
if(options.callback) options.callback(state);
|
||||
});
|
||||
|
||||
process.nextTick(function() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue