mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 09:44:45 +01:00
Core/IPC: Fixed a possible crash on shutdown
This commit is contained in:
@@ -62,5 +62,13 @@ void Battlenet::ServerManager::SendChangeToonOnlineState(uint32 battlenetAccount
|
||||
msg << toon;
|
||||
msg << online;
|
||||
|
||||
_socket->Send(&msg);
|
||||
Send(&msg);
|
||||
}
|
||||
|
||||
void Battlenet::ServerManager::Send(zmqpp::message* msg)
|
||||
{
|
||||
if (!_socket)
|
||||
return;
|
||||
|
||||
_socket->Send(msg);
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
namespace zmqpp
|
||||
{
|
||||
class socket;
|
||||
class message;
|
||||
}
|
||||
|
||||
namespace Battlenet
|
||||
@@ -45,6 +46,8 @@ namespace Battlenet
|
||||
void SendChangeToonOnlineState(uint32 battlenetAccountId, uint32 gameAccountId, ObjectGuid guid, std::string const& name, bool online);
|
||||
|
||||
private:
|
||||
void Send(zmqpp::message* msg);
|
||||
|
||||
static Header CreateHeader(BnetCommands command);
|
||||
ZmqMux* _socket;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user