syncevo-http-server: log port which is used

This is particularly useful in combination with an URL that
has "0" as port number, because then Twisted will automatically pick
a port.
This commit is contained in:
Patrick Ohly 2014-01-17 05:33:22 -08:00
parent ca0b2db58c
commit c1384c9279

View file

@ -585,10 +585,11 @@ syncevo-http-server itself is installed""")
if not options.cert:
logger.error("need server certificate for https")
exit(1)
reactor.listenSSL(url.port, site,
ChainedOpenSSLContextFactory(options.key or options.cert, options.cert))
port = reactor.listenSSL(url.port, site,
ChainedOpenSSLContextFactory(options.key or options.cert, options.cert))
else:
reactor.listenTCP(url.port, site)
port = reactor.listenTCP(url.port, site)
logger.info("listening on port %d", port.getHost().port)
reactor.run()
if __name__ == '__main__':