Skip to content

Commit

Permalink
If statement was wrong. Exclusive not inclusive.
Browse files Browse the repository at this point in the history
  • Loading branch information
super3 committed Jan 25, 2016
1 parent 5b4202b commit 854cf78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyp2p/lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

def get_unused_port(port=None):
"""Checks if port is already in use."""
if port is None or port <= 1024 or port >= 65535:
if port is None or port < 1024 or port > 65535:
port = random.randint(1024, 65535)
assert(1024 <= port <= 65535)
while True:
Expand Down

0 comments on commit 854cf78

Please sign in to comment.