close the elasticsearch client when the server closes

This commit is contained in:
spalger 2015-07-29 15:17:09 -07:00
parent 9ec0636e33
commit bbef901bf9

View file

@ -45,7 +45,9 @@ module.exports = function (server) {
}
});
server.on('close', _.bindKey(client, 'close'));
server.expose('client', client);
return client;
};