Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xmlrpc_manager tries to reuse closed connections #1283

Closed
mgrrx opened this issue Dec 29, 2017 · 2 comments
Closed

xmlrpc_manager tries to reuse closed connections #1283

mgrrx opened this issue Dec 29, 2017 · 2 comments

Comments

@mgrrx
Copy link
Contributor

mgrrx commented Dec 29, 2017

I found time again to revisit the CLOSE_WAIT. Although most CLOSE_WAIT problems are already fixed, roscpp nodes still have always one port in CLOSE_WAIT. This can be easily reproduced by just starting a roscore. The rosout process then has one port in CLOSE_WAIT.

As already addressed in #371, the xmlrpc server used in rosmaster does not use HTTP/1.1. Activating it still leads to the same behavior as reported back then.
Surprisingly, the xmlrpc_manager in roscpp tries to reuse the connections even if the server replies with HTTP/1.0 and closes the connection. Adding the keep-alive flag to the request doesn't help - the server will always close the connection.

I see three solutions to this problem:

  1. Find out why activating HTTP/1.1 in the xmlrpc servers leads to the behavior described in Use HTTP1.1: we get persistent connections for free #371 and fix this issue.
  2. Detect that the server responds with HTTP/1.0 and close the connection accordingly.
  3. Do not cache any xmlrpc connection in roscpp.

I have a working solution for solution 2 which I'll upload in a bit.

@mgrrx
Copy link
Contributor Author

mgrrx commented Jan 2, 2018

  1. Is implemented in Use HTTP/1.1 in XMLRPC Server #1287
  2. Is implemented in [kinetic] Close sockets when server responds with HTTP/1.0 #1284
  3. Is then obsolete

@flixr
Copy link
Contributor

flixr commented Jan 12, 2020

I guess this can be closed as with #1287 merged this doesn't happen anymore in melodic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants