reference stream sessions by weak_ptr

This commit is contained in:
badaix 2019-10-23 22:23:06 +02:00
parent 43bc4c26b8
commit f47d0df9d7
4 changed files with 176 additions and 191 deletions

View file

@ -104,7 +104,8 @@ const PcmStreamPtr StreamSession::pcmStream() const
void StreamSession::start()
{
strand_.post([this]() { read_next(); });
read_next();
// strand_.post([this]() { read_next(); });
}
@ -163,6 +164,7 @@ void StreamSession::sendAsync(msg::message_ptr message, bool send_now)
if (!message)
return;
//sendAsync(shared_const_buffer(*message), send_now);
tv t;
message->sent = t;
std::ostringstream oss;