Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base: 5a9c2a67a5
...
compare: 267d4b87bf
  • 2 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 07, 2014
@mmalecki mmalecki Do not `unref` Postgres client, expose `.end()` instead
This was causing problems with `lamassu-server` exiting prematurely.
8cd27e6
@mmalecki mmalecki Bump version to 0.1.1 267d4b8
Showing with 7 additions and 2 deletions.
  1. +4 −1 lib/main.js
  2. +1 −1  package.json
  3. +2 −0  test/tests.js
View
5 lib/main.js
@@ -24,7 +24,6 @@ var LamassuConfig = module.exports = function (conString) {
this.client = new pg.Client(conString);
this.client.connect();
- this.client.connection.stream.unref();
};
LamassuConfig.prototype._readConfig = function(configType, done) {
@@ -90,3 +89,7 @@ LamassuConfig.prototype.readExchangesConfig = function(done) {
LamassuConfig.prototype.saveExchangesConfig = function(config, done) {
this._updateConfig('exchanges', config, done);
};
+
+LamassuConfig.prototype.end = function () {
+ this.client.end();
+};
View
2  package.json
@@ -1,6 +1,6 @@
{
"name": "lamassu-config",
- "version": "0.1.0",
+ "version": "0.1.1",
"repository": {
"type": "git",
"url": "https://github.com/lamassu/lamassu-config.git"
View
2  test/tests.js
@@ -15,5 +15,7 @@ test('Load config', function(t){
t.notEqual(result.config.exchanges.plugins, null, 'Exchanges should have plugins.');
t.notEqual(result.config.exchanges.plugins.settings, null, 'Exchanges plugins should have settings.');
t.end();
+
+ config.end();
});
});

No commit comments for this range

Something went wrong with that request. Please try again.