diff options
author | Fabian Knittel <fabian.knittel@avona.com> | 2008-07-31 00:58:27 +0200 |
---|---|---|
committer | Fabian Knittel <fabian.knittel@avona.com> | 2008-11-10 02:35:22 +0100 |
commit | 2f9e660362aff595d93ec7c4288ec36bd746d07b (patch) | |
tree | 038a82bf01c8c4d9168287ef1388a4766e5c75b9 | |
parent | ca7a06a09bbfee3f623d157df9c588b52fecf4ab (diff) | |
download | tftpy-2f9e660362aff595d93ec7c4288ec36bd746d07b.tar.gz |
tftpy/TftpServer.py: Remove recurrent randomness seeding.
Seeding the RNG every time defeats the idea. According to the documentation of
the random module, the RNG is seeded once at module load time, so simply remove
the seed() call.
-rw-r--r-- | tftpy/TftpServer.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tftpy/TftpServer.py b/tftpy/TftpServer.py index a5b8e5c..75e7be4 100644 --- a/tftpy/TftpServer.py +++ b/tftpy/TftpServer.py @@ -228,7 +228,6 @@ class TftpServerHandler(TftpSession): """This method generates a new UDP socket, whose listening port must be randomly generated, and not conflict with any already in use. For now, let the OS do this.""" - random.seed() port = random.randrange(1025, 65536) # FIXME - sockets should be non-blocking? sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) |