/* */ #include "EvictSocketPoolCommand.h" #include "RequestGroupMan.h" #include "DownloadEngine.h" namespace aria2 { EvictSocketPoolCommand::EvictSocketPoolCommand(cuid_t cuid, DownloadEngine* e, std::chrono::seconds interval) : TimeBasedCommand(cuid, e, std::move(interval), true) { } EvictSocketPoolCommand::~EvictSocketPoolCommand() {} void EvictSocketPoolCommand::preProcess() { if (getDownloadEngine()->getRequestGroupMan()->downloadFinished() || getDownloadEngine()->isHaltRequested()) { enableExit(); } } void EvictSocketPoolCommand::process() { getDownloadEngine()->evictSocketPool(); } } // namespace aria2