Fix potential use-after-free bugs in the worker with DeleteWorkerSession.
Previously, DeleteWorkerSession was responsible for freeing the WorkerSession owned by the SessionMgr. However, it is possible for other requests to be in-flight on the same session, and requests from the master to be delivered out of order, which leads to the potential for a request to use a WorkerSession after it has been freed. Revise the SessionMgr interface to handle std::shared_ptr<WorkerSession> instead of raw pointers to avoid this risk. PiperOrigin-RevId: 181975078
Loading
Please sign in to comment