Skip to content

Commit

Permalink
fixed displaying of buffered frames if client disconnect immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
mkalkbrenner committed Mar 19, 2024
1 parent 461c711 commit f89ab15
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dmdServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ void run(sockpp::tcp_socket sock, uint32_t threadId)
}

// Display a buffered frame or clear the display on disconnect of the current thread.
if (threadId == currentThreadId && !pDmd->QueueBuffer())
if (threadId == currentThreadId && !pStreamHeader->buffered && !pDmd->QueueBuffer())
{
if (opt_verbose) DMDUtil::Log("Clear screen");
// Clear the DMD by sending a black screen.
// Fixed dimension of 128x32 should be OK for all devices.
memset(buffer, 0, sizeof(DMDUtil::DMD::Update));
Expand Down

0 comments on commit f89ab15

Please sign in to comment.