File tree Expand file tree Collapse file tree 2 files changed +15
-0
lines changed
libraries/YarpPlugins/CartesianControlServer Expand file tree Collapse file tree 2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,9 @@ class RpcResponder : public yarp::dev::DeviceResponder
85
85
void setHandle (ICartesianControl * _iCartesianControl)
86
86
{ iCartesianControl = _iCartesianControl; }
87
87
88
+ void unsetHandle ()
89
+ { iCartesianControl = nullptr ; }
90
+
88
91
bool respond (const yarp::os::Bottle & in, yarp::os::Bottle & out) override ;
89
92
void makeUsage ();
90
93
@@ -151,6 +154,9 @@ class StreamResponder : public yarp::os::TypedReaderCallback<yarp::os::Bottle>
151
154
void setHandle (ICartesianControl * _iCartesianControl)
152
155
{ iCartesianControl = _iCartesianControl;}
153
156
157
+ void unsetHandle ()
158
+ { iCartesianControl = nullptr ; }
159
+
154
160
void onRead (yarp::os::Bottle & b) override ;
155
161
156
162
private:
Original file line number Diff line number Diff line change @@ -51,6 +51,15 @@ bool CartesianControlServer::attach(yarp::dev::PolyDriver * poly)
51
51
bool CartesianControlServer::detach ()
52
52
{
53
53
yarp::os::PeriodicThread::stop ();
54
+
55
+ rpcResponder->unsetHandle ();
56
+ streamResponder->unsetHandle ();
57
+
58
+ if (rpcTransformResponder)
59
+ {
60
+ rpcTransformResponder->unsetHandle ();
61
+ }
62
+
54
63
iCartesianControl = nullptr ;
55
64
return true ;
56
65
}
You can’t perform that action at this time.
0 commit comments