Browse files

Merge pull request #506 from ochameau/bug/776860-fix-http-pref

fix Bug 776860: test-request.testInvalidJSON (exception) r=@gozala
  • Loading branch information...
2 parents b9e57ae + 0fa98d7 commit 8d5482acf5c4030e3ff02a796a9dc585bc981315 @Gozala Gozala committed Jul 24, 2012
Showing with 9 additions and 3 deletions.
  1. +9 −3 packages/api-utils/lib/httpd.js
View
12 packages/api-utils/lib/httpd.js
@@ -482,12 +482,18 @@ nsHttpServer.prototype =
this._host = host;
// The listen queue needs to be long enough to handle
- // network.http.max-connections-per-server concurrent connections,
+ // network.http.max-persistent-connections-per-server concurrent connections,
// plus a safety margin in case some other process is talking to
// the server as well.
var prefs = getRootPrefBranch();
- var maxConnections =
- prefs.getIntPref("network.http.max-connections-per-server") + 5;
+ var maxConnections;
+ try {
+ // Bug 776860: The original pref was removed in favor of this new one:
+ maxConnections = prefs.getIntPref("network.http.max-persistent-connections-per-server") + 5;
+ }
+ catch(e) {
+ maxConnections = prefs.getIntPref("network.http.max-connections-per-server") + 5;
+ }
try
{

0 comments on commit 8d5482a

Please sign in to comment.