Skip to content

Commit

Permalink
Remove public Shutdown method on WriteHandler. (#8713)
Browse files Browse the repository at this point in the history
We don't ever have long-lived WriteHandler instances, so don't need
external shutdown on them.

Fixes #8651
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Sep 1, 2021
1 parent 07116d6 commit a688f19
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/app/InteractionModelEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,7 @@ void InteractionModelEngine::Shutdown()

for (auto & writeHandler : mWriteHandlers)
{
if (!writeHandler.IsFree())
{
writeHandler.Shutdown();
}
VerifyOrDie(writeHandler.IsFree());
}

for (uint32_t index = 0; index < CHIP_IM_SERVER_MAX_NUM_PATH_GROUPS; index++)
Expand Down
9 changes: 4 additions & 5 deletions src/app/WriteHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,6 @@ class WriteHandler
*/
CHIP_ERROR Init(InteractionModelDelegate * apDelegate);

/**
* Shut down the ReadHandler. This terminates this instance
* of the object and releases all held resources.
*/
void Shutdown();
/**
* Process a write request. Parts of the processing may end up being asynchronous, but the WriteHandler
* guarantees that it will call Shutdown on itself when processing is done (including if OnWriteRequest
Expand Down Expand Up @@ -99,6 +94,10 @@ class WriteHandler
void MoveToState(const State aTargetState);
void ClearState();
const char * GetStateStr() const;
/**
* Clean up state when we are done sending the write response.
*/
void Shutdown();

Messaging::ExchangeContext * mpExchangeCtx = nullptr;
WriteResponse::Builder mWriteResponseBuilder;
Expand Down

0 comments on commit a688f19

Please sign in to comment.