Permalink
Browse files

Fix empty_port finder

git-svn-id: svn://cherokee-project.com/cherokee/trunk@5587 5dc97367-97f1-0310-9951-d761b3857238
  • Loading branch information...
taher
taher committed Oct 1, 2010
1 parent 69de07e commit 8b95ba50326e6594f7c94b8ab4f799a9c5aea645
Showing with 6 additions and 2 deletions.
  1. +6 −2 admin/util.py
View
@@ -176,8 +176,12 @@ def cfg_source_find_empty_port (n_ports=1):
ports.append (port)
pport = 1025
- for x in ports:
- if pport + n_ports < x:
+ while pport+n_ports < 65535:
+ pports = range(pport, pport + n_ports)
+ for x in pports:
+ if x in ports:
+ pport += 1
+ break
return pport
assert (False)

0 comments on commit 8b95ba5

Please sign in to comment.