Michael, Are you sure the client is closing the connection and not the server?
The server needs to support and allow keep-alive. When you setKeepAlive(true) you are simply telling the server that want and can handle a persistent connection. The Server will normally respond whether will it allow keep-alive using, Connection: Keep-Alive -or- Connection: close see http://www.io.com/~maus/HttpKeepAlive.html for more info. Check the header in the response to see how the server is responding. The best way to check is to use a sniffer (like Ethereal http://www.ethereal.com/) Mike >-----Original Message----- >From: Michael Zwettler [mailto:[EMAIL PROTECTED] >Sent: Thursday, October 21, 2004 10:56 AM >To: [EMAIL PROTECTED] >Subject: connection keepalive > > > > >Hi! > >I'm trying to write a xmlrpc client that keeps a permanent >connection to a server. Therefor i use XmlRpc.setKeepAlive(true). >This works fine (the connection is kept open) if all requests >are done without a delay between them. But if i do: > > execute request #1 > wait 5 seconds > execute request #2 > >the client closes the connection before executing the second >request. > >Any ideas why the connection is closed? > >Michael