Skip to content

Commit

Permalink
Merge pull request #304 from Nobu19800/bugs/rostransportkill
Browse files Browse the repository at this point in the history
ROSTransportでSubscriber側のRTCが異常終了すると、Publisher側のRTCがエラー状態になる問題
  • Loading branch information
n-ando authored Dec 18, 2023
2 parents d73023e + a00602c commit f2a6f7b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions OpenRTM_aist/ext/transport/ROSTransport/ROSOutPort.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,10 +344,15 @@ def put(self, data):
connector.sendall(data)
except BaseException:
self._rtcout.RTC_ERROR("send error")
self._topicmgr.removeSubscriberLink(connector.getConnection())
try:
self._topicmgr.removeSubscriberLink(connector.getConnection())
except OSError as e:
self._rtcout.RTC_ERROR(e)


# connector.shutdown(socket.SHUT_RDWR)

ret = self.CONNECTION_LOST
#ret = self.CONNECTION_LOST
self._tcp_connecters.remove(connector)
return ret

Expand Down

0 comments on commit f2a6f7b

Please sign in to comment.