< prev index next >

test/jdk/sun/net/www/httptest/TestHttpServer.java

Print this page

        

@@ -143,10 +143,11 @@
     public TestHttpServer (HttpCallback cb, int threads, int cperthread,
                            InetAddress address, int port)
         throws IOException {
         schan = ServerSocketChannel.open ();
         InetSocketAddress addr = new InetSocketAddress (address, port);
+        schan.socket().setReuseAddress(true);
         schan.socket().bind (addr);
         this.threads = threads;
         this.cb = cb;
         this.cperthread = cperthread;
         servers = new Server [threads];
< prev index next >