Diff

net/server.lua @ 1581:4cdf9cefa0bc

net.server: Fail to open port if legacy SSL requested, but SSL not available
author Matthias Diene
date Thu, 23 Jul 2009 12:01:00 +0100
parent 1577:c0e6d11e35ce
child 1612:0413aaf9edae
line wrap: on
line diff
--- a/net/server.lua	Thu Jul 23 03:58:14 2009 +0100
+++ b/net/server.lua	Thu Jul 23 12:01:00 2009 +0100
@@ -190,7 +190,12 @@
     end
     if not ssl then
       sslctx = false;
-      out_put("server.lua: ", "ssl not enabled on ", serverport);
+      if startssl then
+         out_error( "server.lua: Cannot start ssl on port: ", serverport )
+         return nil, "Cannot start ssl,  see log for details"
+       else
+         out_put("server.lua: ", "ssl not enabled on ", serverport);
+       end
     end
 
     local accept = socket.accept