mirror of
https://github.com/yuzu-emu/discord-rpc.git
synced 2025-01-05 14:35:33 +00:00
Only queue messages when connected.
This commit is contained in:
parent
6b10bd6c51
commit
6774b5d881
|
@ -60,6 +60,11 @@ static void UpdateReconnectTime()
|
||||||
|
|
||||||
static QueuedMessage* SendQueueGetNextAddMessage()
|
static QueuedMessage* SendQueueGetNextAddMessage()
|
||||||
{
|
{
|
||||||
|
// if we are not connected, let's not batch up stale messages for later
|
||||||
|
if (!Connection || !Connection->IsOpen()) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
// if we are falling behind, bail
|
// if we are falling behind, bail
|
||||||
if (SendQueuePendingSends.load() >= MessageQueueSize) {
|
if (SendQueuePendingSends.load() >= MessageQueueSize) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
Loading…
Reference in a new issue