| 192 | } |
| 193 | |
| 194 | Status ServerSessionMiddlewareFactory::CloseSession(std::string id) { |
| 195 | const std::lock_guard<std::shared_mutex> l(session_store_lock_); |
| 196 | if (!session_store_.erase(id)) { |
| 197 | return Status::KeyError("Invalid or nonexistent session cannot be closed."); |
| 198 | } |
| 199 | return Status::OK(); |
| 200 | } |
| 201 | |
| 202 | std::shared_ptr<ServerMiddlewareFactory> MakeServerSessionMiddlewareFactory( |
| 203 | std::function<std::string()> id_gen) { |
no test coverage detected