Skip to content

Commit c0cefdc

Browse files
committed
Merge branch 'main' of https://github.com/RobotWebTools/roslibpy into websockets-asyncio
2 parents 6f4b9ca + ed35153 commit c0cefdc

9 files changed

Lines changed: 36 additions & 7 deletions

File tree

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 2.0.0
2+
current_version = 2.0.1
33
message = Bump version to {new_version}
44
commit = True
55
tag = True

.github/workflows/pr-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Check Actions
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v6
13+
- uses: actions/checkout@v7
1414
- name: Changelog check
1515
uses: Zomzog/changelog-checker@09cfe9ad3618dcbfdba261adce0c41904cabb8c4 # v1.3.0
1616
with:

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: publish release
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v6
13+
- uses: actions/checkout@v7
1414
with:
1515
fetch-depth: 0
1616
- name: Verify tag is on main branch

.github/workflows/test-ros1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
os: ubuntu-latest
3232
python-version: "3.11"
3333
steps:
34-
- uses: actions/checkout@v6
34+
- uses: actions/checkout@v7
3535
- name: Set up Python ${{ matrix.python-version }}
3636
uses: actions/setup-python@v6
3737
with:

.github/workflows/test-ros2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
os: ubuntu-latest
3636
python-version: "3.12"
3737
steps:
38-
- uses: actions/checkout@v6
38+
- uses: actions/checkout@v7
3939
- name: Set up Python ${{ matrix.python-version }}
4040
uses: actions/setup-python@v6
4141
with:

CHANGELOG.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,25 @@ Unreleased
2626

2727
**Removed**
2828

29+
2.0.1
30+
----------
31+
32+
**Added**
33+
34+
**Changed**
35+
36+
**Fixed**
37+
38+
* Fixed reconnection on the Twisted transport failing after a connection had
39+
been idle for more than a few seconds: ``connect`` now schedules the
40+
connection through the reactor thread so an idle reactor is woken to service
41+
it (previously the new connector was added from another thread and the
42+
reactor, blocked in ``select()``, never noticed it).
43+
44+
**Deprecated**
45+
46+
**Removed**
47+
2948
2.0.0
3049
----------
3150

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
year = "2019"
2626
author = "Gramazio Kohler Research"
2727
copyright = "{0}, {1}".format(year, author)
28-
version = release = "2.0.0"
28+
version = release = "2.0.1"
2929

3030
pygments_style = "trac" # Perhaps change to sphinx
3131
templates_path = ["."]

src/roslibpy/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
__title__ = "roslibpy"
55
__description__ = "Python ROS Bridge library."
66
__url__ = "https://github.com/gramaziokohler/roslibpy"
7-
__version__ = "2.0.0"
7+
__version__ = "2.0.1"
88
__author__ = "Gramazio Kohler Research"
99
__author_email__ = "gramaziokohler@arch.ethz.ch"
1010
__license__ = "MIT license"

src/roslibpy/comm/comm_autobahn.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ def __init__(self, *args, **kwargs):
7171

7272
def connect(self):
7373
"""Establish WebSocket connection to the ROS server defined for this factory."""
74+
# Route the connection setup through the reactor thread. Calling
75+
# ``connectWS`` directly only happens to work while the reactor is busy;
76+
# once it is idle (e.g. more than ``closeHandshakeTimeout`` seconds after
77+
# a previous disconnect) it sits blocked in ``select()`` and never
78+
# notices a connector added from another thread, so the connection times
79+
# out. ``callFromThread`` wakes it, and is also safe before the reactor
80+
# has started (the call is queued and runs once it does).
81+
reactor.callFromThread(self._connect)
82+
83+
def _connect(self):
7484
self.connector = connectWS(self)
7585

7686
@property

0 commit comments

Comments
 (0)