Use `tokio::time::sleep` instead of `std::thread::sleep`?
Closed this issue · 1 comments
ericpp commented
The std::thread::sleep
call in the LND poller seems to cause the HTTP server to sleep as well (at least in my copy of Helipad). This causes the web interface to feel sluggish as the browser is waiting for the HTTP server to stop sleeping.
Changing the following line:
Line 601 in 973b847
to use tokio::time::sleep
seems to fix the issue:
tokio::time::sleep(tokio::time::Duration::from_millis(9000)).await;
daveajones commented
Good catch! I’ll make that change. I’ve been wondering why that’s happening.