You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2005/11/24 06:35:18 UTC

svn commit: r348666 - /tomcat/sandbox/java/org/apache/coyote/standalone/Main.java

Author: costin
Date: Wed Nov 23 21:35:15 2005
New Revision: 348666

URL: http://svn.apache.org/viewcvs?rev=348666&view=rev
Log:
Few fixes to match the new changes

Modified:
    tomcat/sandbox/java/org/apache/coyote/standalone/Main.java

Modified: tomcat/sandbox/java/org/apache/coyote/standalone/Main.java
URL: http://svn.apache.org/viewcvs/tomcat/sandbox/java/org/apache/coyote/standalone/Main.java?rev=348666&r1=348665&r2=348666&view=diff
==============================================================================
--- tomcat/sandbox/java/org/apache/coyote/standalone/Main.java (original)
+++ tomcat/sandbox/java/org/apache/coyote/standalone/Main.java Wed Nov 23 21:35:15 2005
@@ -29,6 +29,13 @@
         return proto;
     }
     
+    /**
+     */
+    public void run() {
+        init();
+        start();
+    }
+    
     public void init() {
         proto = new Http11BaseProtocol();
 
@@ -46,25 +53,20 @@
         return mainAdapter;
     }
     
-    /**
-     */
-    public void run() {
-        init();
-        start();
-    }
-    
     public void start() {
-        if( proto.getPort() == 0 )
+        if( proto.getPort() == 0 && 
+                proto.getEndpoint().getServerSocket() == null) {
             proto.setPort(8800);
+        }
         
         try {
             proto.init();
 
-            proto.getThreadPool().setDaemon(false);
+            proto.getEndpoint().setDaemon(false);
             
             proto.start();
 
-        } catch (Exception e) {
+        } catch (Throwable e) {
             e.printStackTrace();
         }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org