Software /
code /
prosody
Diff
net/server.lua @ 2967:c39ad633b26d
net.server: Fix logic error causing traceback when receiving a non-number port
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 09 Apr 2010 12:25:54 +0100 |
parent | 2923:b7049746bd29 |
child | 2968:fdd049a4e551 |
line wrap: on
line diff
--- a/net/server.lua Sat Apr 03 22:26:14 2010 +0100 +++ b/net/server.lua Fri Apr 09 12:25:54 2010 +0100 @@ -698,7 +698,7 @@ 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"