
By always starting the session shutdown process by stopping the client DCB, the manipulation of the session state can be removed from the backend protocol modules and replaced with a fake hangup event. Delivering this event via the core allows the actual dcb_close call on the client DCB to be done only when the client DCB is being handled by a worker.