FileLoadManager: hangup bugfix
GitOrigin-RevId: 7d8a922dfd3e07769507123e39df66d7ea3d00d3
This commit is contained in:
parent
2897cb80d4
commit
50a5098b0f
@ -154,7 +154,7 @@ void FileLoadManager::update_local_file_location(QueryId id, const LocalFileLoca
|
||||
}
|
||||
send_closure(node->loader_, &FileLoaderActor::update_local_file_location, local);
|
||||
}
|
||||
void FileLoadManager::close() {
|
||||
void FileLoadManager::hangup() {
|
||||
nodes_container_.for_each([](auto id, auto &node) { node.loader_.reset(); });
|
||||
stop_flag_ = true;
|
||||
loop();
|
||||
|
@ -55,9 +55,6 @@ class FileLoadManager final : public Actor {
|
||||
void update_local_file_location(QueryId id, const LocalFileLocation &local);
|
||||
void get_content(const FullLocalFileLocation &local_location, Promise<BufferSlice> promise);
|
||||
|
||||
// just stops actor and all queries. no callbacks will be called
|
||||
void close();
|
||||
|
||||
private:
|
||||
struct Node {
|
||||
QueryId query_id_;
|
||||
@ -78,6 +75,7 @@ class FileLoadManager final : public Actor {
|
||||
|
||||
void start_up() override;
|
||||
void loop() override;
|
||||
void hangup() override;
|
||||
void hangup_shared() override;
|
||||
|
||||
void close_node(NodeId node_id);
|
||||
|
@ -463,8 +463,6 @@ void FileManager::init_actor() {
|
||||
"FileGenerateManager", G()->get_slow_net_scheduler_id(), context_->create_reference());
|
||||
}
|
||||
FileManager::~FileManager() {
|
||||
// NB: As FileLoadManager callback is just "this" pointer, this event must be processed immediately.
|
||||
send_closure(std::move(file_load_manager_), &FileLoadManager::close);
|
||||
}
|
||||
|
||||
string FileManager::fix_file_extension(Slice file_name, Slice file_type, Slice file_extension) {
|
||||
|
Loading…
Reference in New Issue
Block a user