Permalink
Browse files

only set .end() in .listen() which does more magicalish things

  • Loading branch information...
substack committed Jul 29, 2012
1 parent 37962d4 commit cc213dbe3c640c05206eaa2ab11e4deda1034a53
Showing with 12 additions and 12 deletions.
  1. +11 −11 index.js
  2. +1 −1 package.json
View
@@ -75,18 +75,18 @@ var upnode = module.exports = function (cons) {
});
};
- return server;
- };
-
- self.end = function () {
- if (!self._closed) self.close();
+ self.end = function () {
+ if (!self._closed) self.close();
+
+ (self._servers || []).forEach(function (server) {
+ server.end();
+ });
+ (self._ups || []).forEach(function (up) {
+ up.end();
+ });
+ };
- (self._servers || []).forEach(function (server) {
- server.end();
- });
- (self._ups || []).forEach(function (up) {
- up.end();
- });
+ return server;
};
return self;
View
@@ -1,7 +1,7 @@
{
"name" : "upnode",
"description" : "transactional connection queue for dnode",
- "version" : "0.4.0",
+ "version" : "0.4.1",
"repository" : {
"type" : "git",
"url" : "git://github.com/substack/upnode.git"

0 comments on commit cc213db

Please sign in to comment.