callback parameter to service rpc server should be const ref isntead of copy
This commit is contained in:
1 parent
3360ca0302
commit
ef97b447b0
11 files changed
+36
-31
No files matched your search
@@ -344,7 +344,7 @@ struct MDRelayServer : bts::co2::MarketDataRelayBase {
|
||||
_db(db), _threadpool(threadpool)
|
||||
{ }
|
||||
|
||||
virtual void requestmd(const MDRequest & request, std::function<void(const MDReply&)> reply) override {
|
||||
virtual void requestmd(const MDRequest & request, const std::function<void(const MDReply&)>& reply) override {
|
||||
_threadpool.post([=]() {
|
||||
google::protobuf::Arena arena;
|
||||
MDReply* preply = google::protobuf::Arena::CreateMessage<MDReply>(&arena);
|
||||
|
||||
Reference in new issue
Block a user