pixl-server-web 1.3.22 → 1.3.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/http.js CHANGED
@@ -234,6 +234,10 @@ module.exports = class HTTP {
234
234
  self.logDebug(3, "Actual HTTP listener port chosen: " + port);
235
235
  }
236
236
  self.listeners.push(listener);
237
+
238
+ // LEGACY HACK -- FOR CRONICLE VERSIONS UNDER v0.9.34
239
+ self.http = listener;
240
+
237
241
  callback();
238
242
  } );
239
243
 
package/lib/https.js CHANGED
@@ -232,6 +232,10 @@ module.exports = class HTTP2 {
232
232
  self.logDebug(3, "Actual HTTPS listener port chosen: " + port);
233
233
  }
234
234
  self.listeners.push(listener);
235
+
236
+ // LEGACY HACK -- FOR CRONICLE VERSIONS UNDER v0.9.34
237
+ self.https = listener;
238
+
235
239
  callback();
236
240
  } );
237
241
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixl-server-web",
3
- "version": "1.3.22",
3
+ "version": "1.3.24",
4
4
  "description": "A web server component for the pixl-server framework.",
5
5
  "author": "Joseph Huckaby <jhuckaby@gmail.com>",
6
6
  "homepage": "https://github.com/jhuckaby/pixl-server-web",
package/web_server.js CHANGED
@@ -232,12 +232,13 @@ class WebServer extends Component {
232
232
  );
233
233
  }
234
234
 
235
- dumpAllRequests(callback) {
235
+ dumpAllRequests() {
236
236
  // create dump file containing info on all active/pending requests
237
237
  // this is called when requests or sockets are maxed out
238
238
  // only write file every N seconds
239
239
  var self = this;
240
240
  var now = Date.now() / 1000;
241
+ if (!this.reqMaxDumpEnabled) return;
241
242
  if (now - this.reqMaxDumpLast < this.reqMaxDumpDebounce) return;
242
243
  this.reqMaxDumpLast = now;
243
244
 
@@ -265,7 +266,6 @@ class WebServer extends Component {
265
266
  this.logDebug(5, "Writing dump file: " + dump_file );
266
267
  fs.writeFile( dump_file, JSON.stringify(json, null, "\t") + "\n", function(err) {
267
268
  if (err) self.logError('dump', "Failed to write dump file: " + dump_file + ": " + err, err);
268
- if (callback) callback(err);
269
269
  } );
270
270
  }
271
271