mirror of
https://github.com/edubart/otclient.git
synced 2025-12-21 07:57:12 +01:00
clean containers when relogging
This commit is contained in:
@@ -123,6 +123,8 @@ void Connection::write(uint8* buffer, uint16 size)
|
||||
|
||||
if(!m_sendEvent || m_sendEvent->isExecuted() || m_sendEvent->isCanceled()) {
|
||||
auto weakSelf = ConnectionWeakPtr(shared_from_this());
|
||||
|
||||
// wait 1 ms to do the real send
|
||||
m_sendEvent = g_eventDispatcher.scheduleEvent([=] {
|
||||
if(!weakSelf.lock())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user