Skip to content

Commit

Permalink
close Channel after stopping recv send queues (#808)
Browse files Browse the repository at this point in the history
Channel is used by recv and send queues and possible blocked in I/O
operations.  Closing the channel while it is still in use causes
problems with the recv and send queues and may cause problems in other
threads of the application.
  • Loading branch information
fboucher67 authored and maxsharabayko committed Aug 19, 2019
1 parent b564763 commit 553b24a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srtcore/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1662,9 +1662,9 @@ void CUDTUnited::removeSocket(const SRTSOCKET u)
// being currently done in the queues, if any.
mx.m_pSndQueue->setClosing();
mx.m_pRcvQueue->setClosing();
mx.m_pChannel->close();
delete mx.m_pSndQueue;
delete mx.m_pRcvQueue;
mx.m_pChannel->close();
delete mx.m_pTimer;
delete mx.m_pChannel;
m_mMultiplexer.erase(m);
Expand Down

0 comments on commit 553b24a

Please sign in to comment.