Skip to content

Commit 6f0a360

Browse files
fujitatomoyamergify[bot]
authored andcommitted
Prevents the Future result from being set twice. (#1599)
Signed-off-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Co-authored-by: Nadav Elkabets <elnadav12@gmail.com> (cherry picked from commit a348801) # Conflicts: # rclpy/rclpy/action/server.py
1 parent 198f04e commit 6f0a360

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

rclpy/rclpy/action/server.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,27 @@ def publish_feedback(self, feedback):
148148

149149
def succeed(self):
150150
self._update_state(_rclpy.GoalEvent.SUCCEED)
151+
<<<<<<< HEAD
152+
=======
153+
if response is not None:
154+
self._set_result(response)
155+
>>>>>>> a348801 (Prevents the Future result from being set twice. (#1599))
151156

152157
def abort(self):
153158
self._update_state(_rclpy.GoalEvent.ABORT)
159+
<<<<<<< HEAD
160+
=======
161+
if response is not None:
162+
self._set_result(response)
163+
>>>>>>> a348801 (Prevents the Future result from being set twice. (#1599))
154164

155165
def canceled(self):
156166
self._update_state(_rclpy.GoalEvent.CANCELED)
167+
<<<<<<< HEAD
168+
=======
169+
if response is not None:
170+
self._set_result(response)
171+
>>>>>>> a348801 (Prevents the Future result from being set twice. (#1599))
157172

158173
def destroy(self):
159174
with self._lock:

0 commit comments

Comments
 (0)