[Spread-users] Socket Timeout

Ryan Caudy rcaudy at gmail.com
Sat Nov 6 12:53:21 EST 2004


Hi Again Alberto,

I looked into this problem... it appears to be caused by a race
condition between the main thread and the listening thread.  When you
disconnect, it instructs the listener to exit by setting a flag, and
the listener may or may not actually exit before the disconnect method
closes the socket.  If the listener exits first, you won't see that
message, otherwise you will.  I'll think about a solution to avoid
that output, but for now you shouldn't worry about it -- it's not a
real error.  However, if you wanted to try to avoid it, use
SpreadConnection's stopListener() method a second or so before calling
disconnect().

Cheers,
Ryan


On Fri, 5 Nov 2004 12:41:30 +0100 (CET), Alberto Martinez
<albertinho_2000 at yahoo.es> wrote:
> Hi!
>    When I leave a group and disconnect from a
> connection,   sometimes appears this message about
> setting a timeout. Do you know some way of disabling
> this timeout?
> 
> LISTENER: told to exit so returning
> socket error setting timeout java.net.SocketException:
> Socket is closed
> 
> ______________________________________________
> Renovamos el Correo Yahoo!: ¡100 MB GRATIS!
> Nuevos servicios, más seguridad
> http://correo.yahoo.es
> 
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users
> 


-- 
---------------------------------------------------------------------
Ryan W. Caudy
<rcaudy at gmail.com>
---------------------------------------------------------------------
Bloomberg L.P.
<rcaudy1 at bloomberg.net>
---------------------------------------------------------------------
[Alumnus]
<caudy at cnds.jhu.edu>         
Center for Networking and Distributed Systems
Department of Computer Science
Johns Hopkins University          
---------------------------------------------------------------------




More information about the Spread-users mailing list