diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-04-09 12:25:54 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-04-09 12:25:54 +0100 |
commit | 6778955731063d37b1de314384f002ce4509fd2e (patch) | |
tree | 857222f8f77a75ef393c873328855ed2cc236c22 /net/server.lua | |
parent | 1b43f0146e5de1245f6bcbd4b4e0fbd2f513b863 (diff) | |
download | prosody-6778955731063d37b1de314384f002ce4509fd2e.tar.gz prosody-6778955731063d37b1de314384f002ce4509fd2e.zip |
net.server: Fix logic error causing traceback when receiving a non-number port
Diffstat (limited to 'net/server.lua')
-rw-r--r-- | net/server.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server.lua b/net/server.lua index 43a91758..61e3104f 100644 --- a/net/server.lua +++ b/net/server.lua @@ -698,7 +698,7 @@ addserver = function( listeners, port, addr, pattern, sslctx, maxconnections, st if type( listeners ) ~= "table" then
err = "invalid listener table"
end
- if not type( port ) == "number" or not ( port >= 0 and port <= 65535 ) then
+ if type( port ) ~= "number" or not ( port >= 0 and port <= 65535 ) then
err = "invalid port"
elseif _server[ port ] then
err = "listeners on port '" .. port .. "' already exist"
|