Corrected channel in correlation id.

This commit is contained in:
Pedro Pinto committed 2018-12-05 23:31:26 +00:00
1 parent 9cb619d374
commit 8cfca8e40e
3 files changed
+64 -18

No files matched your search

+8 -2
View File
@@ -84,7 +84,8 @@ struct AsyncReader::PImpl
sink (sink),
perf_log(l),
high_water_mark (high_water_mark),
connection_name(connection_name)
connection_name(connection_name),
channel(new std::string(connection_name))
{}
// abstraction for source of raw bytes
@@ -106,6 +107,11 @@ struct AsyncReader::PImpl
// need to increase the buffer size
uint32_t high_water_mark;
const std::string connection_name;
// we leak this because we do not have a good way to pass a pointer
// to the perf_log object and guarantee that pointer is valid by
// the time the string is written to disk
const std::string *channel;
};
AsyncReader::AsyncReader (IConnection &connection,
@@ -144,7 +150,7 @@ void AsyncReader::dispatch ()
auto read_count = me->connection.read (cursor (),free_bytes ());
auto read_time = utils::TimeStamp::now();
trace::CorID trace;
trace.channel = "fix";
trace.channel = me->channel->c_str();
// signal a disconnect if the connection broke
if (read_count <= 0) {