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

[windows] Workaround for Python 2 xmlrpc performance issues. #1872

Merged
merged 2 commits into from
Feb 7, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion tools/roslaunch/env-hooks/10.roslaunch.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
REM roslaunch/env-hooks/10.roslaunch.bat

:: workaround Python 2 xmlrpc performance issue
:: https://stackoverflow.com/questions/2617615/slow-python-http-server-on-localhost
:: use IP address instead to avoid unnecessary DNS lookups.
if "%ROS_MASTER_URI%" == "" (
set ROS_MASTER_URI=http://localhost:11311
set ROS_MASTER_URI=http://127.0.0.1:11311
)

if "%ROS_IP%" == "" (
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't take into account if ROS_HOSTNAME is set. And it is discourage to set both - ROS_IP and ROS_HOSTNAME at the same time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dirk-thomas Thanks. I edited the check to make sure ROS_IP is only set when both don't exist in the environments.

set ROS_IP=127.0.0.1
)