diff --git a/src/lib/client/Client.cpp b/src/lib/client/Client.cpp index b37aa558..c744ec2b 100644 --- a/src/lib/client/Client.cpp +++ b/src/lib/client/Client.cpp @@ -820,7 +820,7 @@ Client::sendFileThread(void* filename) char* name = static_cast(filename); StreamChunker::sendFile(name, m_events, this); } - catch (std::runtime_error error) { + catch (std::runtime_error& error) { LOG((CLOG_ERR "failed sending file chunks: %s", error.what())); } diff --git a/src/lib/server/Server.cpp b/src/lib/server/Server.cpp index 509467fc..206b145c 100644 --- a/src/lib/server/Server.cpp +++ b/src/lib/server/Server.cpp @@ -2392,7 +2392,7 @@ Server::sendFileThread(void* data) LOG((CLOG_DEBUG "sending file to client, filename=%s", filename)); StreamChunker::sendFile(filename, m_events, this); } - catch (std::runtime_error error) { + catch (std::runtime_error &error) { LOG((CLOG_ERR "failed sending file chunks, error: %s", error.what())); }