chriskohlhoff / asio

Asio C++ Library
http://think-async.com/Asio
4.89k stars 1.21k forks source link

void io_context::restart() should clear all deferred tasks #1310

Open ostropik opened 1 year ago

ostropik commented 1 year ago

void io_context::restart()

On the second call io.run_one(); will appear timeout expired event from deadline_timer even if on the second call timer was not added to async_wait() So this deadline_timer event from previous io.run_one(); with timer