Skip to content

Commit 1fa588d

Browse files
committed
Only send pause when RTDEClient is running
1 parent 4410677 commit 1fa588d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/rtde/rtde_client.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,10 @@ void RTDEClient::disconnect()
447447
// If communication is started it should be paused before disconnecting
448448
if (client_state_ == ClientState::RUNNING)
449449
{
450-
sendPause();
450+
pause();
451+
}
452+
if (client_state_ >= ClientState::PAUSED)
453+
{
451454
pipeline_->stop();
452455
}
453456
if (client_state_ > ClientState::UNINITIALIZED)

0 commit comments

Comments
 (0)