| 233 | } |
| 234 | |
| 235 | void GetTCP::notifyStop() { |
| 236 | running_ = false; |
| 237 | // await threads to shutdown. |
| 238 | client_thread_pool_.shutdown(); |
| 239 | std::unique_ptr<io::Socket> socket_ptr; |
| 240 | while (socket_ring_buffer_.size_approx() > 0) { |
| 241 | socket_ring_buffer_.try_dequeue(socket_ptr); |
| 242 | } |
| 243 | } |
| 244 | void GetTCP::onTrigger(const std::shared_ptr<core::ProcessContext> &context, const std::shared_ptr<core::ProcessSession>& /*session*/) { |
| 245 | // Perform directory list |
| 246 | metrics_->iterations_++; |