diff --git a/examples/ota-provider-app/esp32/main/BdxOtaSender.cpp b/examples/ota-provider-app/esp32/main/BdxOtaSender.cpp
index 2721878..5ff0e55 100644
--- a/examples/ota-provider-app/esp32/main/BdxOtaSender.cpp
+++ b/examples/ota-provider-app/esp32/main/BdxOtaSender.cpp
@@ -174,7 +174,6 @@
         {
             ChipLogError(BDX, "onTransferComplete Callback not set");
         }
-        mStopPolling = true; // Stop polling the TransferSession only after receiving BlockAckEOF
         Reset();
         break;
     case TransferSession::OutputEventType::kStatusReceived:
@@ -228,7 +227,7 @@
 {
     mFabricIndex.ClearValue();
     mNodeId.ClearValue();
-    mTransfer.Reset();
+    ResetTransfer();
     if (mExchangeCtx != nullptr)
     {
         mExchangeCtx->Close();
diff --git a/examples/ota-provider-app/ota-provider-common/BdxOtaSender.cpp b/examples/ota-provider-app/ota-provider-common/BdxOtaSender.cpp
index 5c3f221..871d8bf 100644
--- a/examples/ota-provider-app/ota-provider-common/BdxOtaSender.cpp
+++ b/examples/ota-provider-app/ota-provider-common/BdxOtaSender.cpp
@@ -180,7 +180,6 @@
         break;
     case TransferSession::OutputEventType::kAckEOFReceived:
         ChipLogDetail(BDX, "Transfer completed, got AckEOF");
-        mStopPolling = true; // Stop polling the TransferSession only after receiving BlockAckEOF
         Reset();
         break;
     case TransferSession::OutputEventType::kStatusReceived:
@@ -212,7 +211,7 @@
 {
     mFabricIndex.ClearValue();
     mNodeId.ClearValue();
-    Responder::ResetTransfer();
+    ResetTransfer();
     if (mExchangeCtx != nullptr)
     {
         mExchangeCtx->Close();
diff --git a/src/protocols/bdx/TransferFacilitator.cpp b/src/protocols/bdx/TransferFacilitator.cpp
index fbe5631..94962e2 100644
--- a/src/protocols/bdx/TransferFacilitator.cpp
+++ b/src/protocols/bdx/TransferFacilitator.cpp
@@ -32,6 +32,20 @@
 constexpr System::Clock::Timeout TransferFacilitator::kDefaultPollFreq;
 constexpr System::Clock::Timeout TransferFacilitator::kImmediatePollDelay;
 
+TransferFacilitator::~TransferFacilitator()
+{
+    ResetTransfer();
+}
+
+void TransferFacilitator::ResetTransfer()
+{
+    mTransfer.Reset();
+    ChipLogProgress(BDX, "Stop polling for messages");
+
+    VerifyOrReturn(mSystemLayer != nullptr);
+    mSystemLayer->CancelTimer(PollTimerHandler, this);
+}
+
 CHIP_ERROR TransferFacilitator::OnMessageReceived(chip::Messaging::ExchangeContext * ec, const chip::PayloadHeader & payloadHeader,
                                                   chip::System::PacketBufferHandle && payload)
 {
@@ -78,15 +92,7 @@
     HandleTransferSessionOutput(outEvent);
 
     VerifyOrReturn(mSystemLayer != nullptr, ChipLogError(BDX, "%s mSystemLayer is null", __FUNCTION__));
-    if (!mStopPolling)
-    {
-        mSystemLayer->StartTimer(mPollFreq, PollTimerHandler, this);
-    }
-    else
-    {
-        mSystemLayer->CancelTimer(PollTimerHandler, this);
-        mStopPolling = false;
-    }
+    mSystemLayer->StartTimer(mPollFreq, PollTimerHandler, this);
 }
 
 void TransferFacilitator::ScheduleImmediatePoll()
@@ -106,18 +112,10 @@
     ReturnErrorOnFailure(mTransfer.WaitForTransfer(role, xferControlOpts, maxBlockSize, timeout));
 
     ChipLogProgress(BDX, "Start polling for messages");
-    mStopPolling = false;
     mSystemLayer->StartTimer(mPollFreq, PollTimerHandler, this);
     return CHIP_NO_ERROR;
 }
 
-void Responder::ResetTransfer()
-{
-    mTransfer.Reset();
-    ChipLogProgress(BDX, "Stop polling for messages");
-    mStopPolling = true;
-}
-
 CHIP_ERROR Initiator::InitiateTransfer(System::Layer * layer, TransferRole role, const TransferSession::TransferInitData & initData,
                                        System::Clock::Timeout timeout, System::Clock::Timeout pollFreq)
 {
@@ -132,12 +130,5 @@
     return CHIP_NO_ERROR;
 }
 
-void Initiator::ResetTransfer()
-{
-    mTransfer.Reset();
-    ChipLogProgress(BDX, "Stop polling for messages");
-    mStopPolling = true;
-}
-
 } // namespace bdx
 } // namespace chip
diff --git a/src/protocols/bdx/TransferFacilitator.h b/src/protocols/bdx/TransferFacilitator.h
index 97e981a..280b6bf 100644
--- a/src/protocols/bdx/TransferFacilitator.h
+++ b/src/protocols/bdx/TransferFacilitator.h
@@ -45,7 +45,12 @@
 {
 public:
     TransferFacilitator() : mExchangeCtx(nullptr), mSystemLayer(nullptr), mPollFreq(kDefaultPollFreq) {}
-    ~TransferFacilitator() override = default;
+    ~TransferFacilitator() override;
+
+    /**
+     * Calls reset on the TransferSession object and stops the poll timer.
+     */
+    void ResetTransfer();
 
 private:
     //// UnsolicitedMessageHandler Implementation ////
@@ -96,7 +101,6 @@
     System::Clock::Timeout mPollFreq;
     static constexpr System::Clock::Timeout kDefaultPollFreq    = System::Clock::Milliseconds32(500);
     static constexpr System::Clock::Timeout kImmediatePollDelay = System::Clock::Milliseconds32(1);
-    bool mStopPolling                                           = false;
 };
 
 /**
@@ -121,11 +125,6 @@
     CHIP_ERROR PrepareForTransfer(System::Layer * layer, TransferRole role, BitFlags<TransferControlFlags> xferControlOpts,
                                   uint16_t maxBlockSize, System::Clock::Timeout timeout,
                                   System::Clock::Timeout pollFreq = TransferFacilitator::kDefaultPollFreq);
-
-    /**
-     * Calls reset on the TransferSession object and stops the poll timer.
-     */
-    void ResetTransfer();
 };
 
 /**
@@ -150,10 +149,6 @@
     CHIP_ERROR InitiateTransfer(System::Layer * layer, TransferRole role, const TransferSession::TransferInitData & initData,
                                 System::Clock::Timeout timeout,
                                 System::Clock::Timeout pollFreq = TransferFacilitator::kDefaultPollFreq);
-    /**
-     * Calls reset on the TransferSession object and stops the poll timer.
-     */
-    void ResetTransfer();
 };
 
 } // namespace bdx
