Only stop the sensor connector if it's currently collecting.

Otherwise, it might erroneously stop another instance that is
collecting.

[#81782738]