[Spread-users] java: reconnect to spread deamon

Ryan Caudy rcaudy at gmail.com
Thu Jul 21 19:01:05 EDT 2005


You're trying to reuse a private name, after the connection dropped
unexpectedly, correct?
Spread will free it up and allow re-use, but only once it realizes the
connection is down.

I think you might be able to stimulate it to notice sooner by
triggering a write to the downed connection's socket.

One mechanism to accomplish the above would be to have all of your
newly created connections join a single group "heartbeat", and
periodically send messages to that group, on the order of once a
second.

--Ryan

On 7/21/05, Michael Zurke <mischa at zurke.info> wrote:
> thanx. but this solution won't help much since i can't just kill all
> other connections by killing the socket (the client is also not running
> on the same box). i guess there is no way of telling the deamon to get
> rid of a particular reference to a spread connection. is there something
> like a timeout where the deamon just cleans up the unused connections?
> 
> tha,
> mischa
> 
> Yuval Lifshitz wrote:
> > If the daemon crashed (does not happen so often) than
> > the internal socket will be released, but if something
> > happened to the client, and you failed to reconnect
> > there is a brute way to do that if your client is on
> > the same (Linux like) machine of the daemon:
> >
> > rm -f /tmp/4803
> >
> > note that this will close connection to all clients on
> > that machine.
> >
> > --- Michael Zurke <mischa at zurke.info> wrote:
> >
> >
> >>hi,
> >>
> >>now and then my spread connection seems to crash. in
> >>this case i want to
> >>recreate a new connection. therefore i try to
> >>diconnect() and
> >>reinitialise the connection with the old connection
> >>name which causes
> >>spread.SpreadException: Connection closed while
> >>reading authname.
> >>is there a way to tell the deamon to get rid of the
> >>old connection so i
> >>can use the old connection name for the new
> >>connection?
> >>thanx,
> >>mischa
> >>
> >>_______________________________________________
> >>Spread-users mailing list
> >>Spread-users at lists.spread.org
> >>
> >
> > http://lists.spread.org/mailman/listinfo/spread-users
> >
> >
> >
> >
> > ____________________________________________________
> > Start your day with Yahoo! - make it your home page
> > http://www.yahoo.com/r/hs
> >
> >
> 
> 
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users
>




More information about the Spread-users mailing list