Browse Source

Fixed silly bug with not giving proper warnings when already listening on a port

M. Ian Graham 18 years ago
parent
commit
42ac45fd53
1 changed files with 3 additions and 2 deletions
  1. 3 2
      direct/src/http/WebRequest.py

+ 3 - 2
direct/src/http/WebRequest.py

@@ -98,10 +98,11 @@ class WebRequestDispatcher(object):
         Singleton server, so ignore multiple listen requests.
         """
         if self.listenPort is None:
+            self.listenPort = listenPort
             HttpRequest.HttpManagerInitialize(listenPort)
-            self.notify.info("Web server is listening on port %d" % listenPort)
+            self.notify.info("Listening on port %d" % listenPort)
         else:
-            self.notify.warning("Web server is already listening on port %d.  Ignoring request to listen on port %d." % (self.listenPort,listenPort))
+            self.notify.warning("Already listening on port %d.  Ignoring request to listen on port %d." % (self.listenPort,listenPort))
 
     def invalidURI(self,replyTo,**kw):
         resp = "<html><body>Error 404</body></html>\r\n"