Prepare ougoing xml's buffer before adding it to queue to reduce stream mutex contention.
git-svn-id: http://yate.null.ro/svn/yate/trunk@5805 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
3c7346a548
commit
50eb96f454
|
@ -561,9 +561,11 @@ bool JBStream::sendStanza(XmlElement*& xml)
|
|||
TelEngine::destruct(xml);
|
||||
return false;
|
||||
}
|
||||
Lock lock(this);
|
||||
m_pending.append(new XmlElementOut(xml));
|
||||
XmlElementOut* xo = new XmlElementOut(xml);
|
||||
xml = 0;
|
||||
xo->prepareToSend();
|
||||
Lock lock(this);
|
||||
m_pending.append(xo);
|
||||
sendPending();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue