> doh. well it works for me ;) (Linux IBM and Suns JDKs).
>
> It could be platform differences in Socket behaviour ... however not
> sure. On
> Linux interupting the thread results in accept() throwing an
> IOException. Not
> sure how cross-platform this is.
>
> Try adding m_serverSocket.setSoTimeout( 500 ); (or some other number) at
> top
> of loop before accept call in Connection. If that works then we know it
> is
> probably inconsistencies between unix/windows.
Good tip. now it's working! :-)
Thanks
Buchi
Here the patch!
-----------------------------------------------------------------
--- Connection.java.orig Thu Sep 6 12:21:44 2001
+++ Connection.java Thu Sep 6 16:35:02 2001
@@ -8,8 +8,10 @@
package org.apache.avalon.cornerstone.blocks.connection;
import java.io.IOException;
+import java.io.InterruptedIOException;
import java.net.ServerSocket;
import java.net.Socket;
+import java.net.SocketException;
import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
@@ -78,6 +80,12 @@
public void run()
{
+ try
+ {
+ m_serverSocket.setSoTimeout(500);
+ } catch (SocketException se) {
+ getLogger().warn("Couldn't set serverSocket SOTIMEOUT!");
+ }
m_thread = Thread.currentThread();
while( null != m_thread && !Thread.interrupted() )
@@ -90,6 +98,10 @@
new ConnectionRunner( socket, m_runners, handler );
setupLogger( runner );
m_threadPool.execute( runner );
+ }
+ catch (final InterruptedIOException iie)
+ {
+ // ignore this execptions...
}
catch( final IOException ioe )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]