Do not use __func__ inside lambdas

This commit is contained in:
seelabs
2021-06-01 15:07:39 -04:00
committed by manojsdoshi
parent 04ff6249d5
commit 9fd5cd303d
4 changed files with 12 additions and 12 deletions

View File

@@ -110,9 +110,9 @@ ETLSource::reconnect(boost::beast::error_code ec)
size_t waitTime = std::min(pow(2, numFailures_), 30.0);
numFailures_++;
timer_.expires_after(boost::asio::chrono::seconds(waitTime));
timer_.async_wait([this](auto ec) {
timer_.async_wait([this, fname = __func__](auto ec) {
bool startAgain = (ec != boost::asio::error::operation_aborted);
JLOG(journal_.trace()) << __func__ << " async_wait : ec = " << ec;
JLOG(journal_.trace()) << fname << " async_wait : ec = " << ec;
close(startAgain);
});
}
@@ -133,11 +133,11 @@ ETLSource::close(bool startAgain)
closing_ = true;
ws_->async_close(
boost::beast::websocket::close_code::normal,
[this, startAgain](auto ec) {
[this, startAgain, fname = __func__](auto ec) {
if (ec)
{
JLOG(journal_.error())
<< __func__ << " async_close : "
<< fname << " async_close : "
<< "error code = " << ec << " - " << toString();
}
closing_ = false;