Skip to content

Commit

Permalink
[windows] Remove python2 specific hack
Browse files Browse the repository at this point in the history
This PR ros#1872 made windows act differently than linux because of a specific python 2 delay doing unnecessary DNS checks for localhost.

The underlying code in python is different for python3 so the hack is no longer necessary. Given that, its better to reunify the codebase
  • Loading branch information
gftabor authored Nov 30, 2023
1 parent 845f746 commit 8227b79
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions tools/roslaunch/env-hooks/10.roslaunch.bat
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
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://127.0.0.1:11311
)

:: it is discourage to set ROS_IP and ROS_HOSTNAME at the same time.
if "%ROS_IP%" == "" (
if "%ROS_HOSTNAME%" == "" (
set ROS_IP=127.0.0.1
)
set ROS_MASTER_URI=http://localhost:11311
)

0 comments on commit 8227b79

Please sign in to comment.