Skip to content

Commit 39ebdb4

Browse files
DSheirerDennis Sheirer
andauthored
#1491 Adds diagnostic logging to dispatcher to support troubleshooting polyphase channel manager's dispatch thread being blocked. (#1492)
Co-authored-by: Dennis Sheirer <[email protected]>
1 parent c788292 commit 39ebdb4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/main/java/io/github/dsheirer/util/Dispatcher.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* *****************************************************************************
3-
* Copyright (C) 2014-2022 Dennis Sheirer
3+
* Copyright (C) 2014-2023 Dennis Sheirer
44
*
55
* This program is free software: you can redistribute it and/or modify
66
* it under the terms of the GNU General Public License as published by
@@ -91,7 +91,9 @@ public void receive(E e)
9191
if(System.currentTimeMillis() > (mLastOverflowLogEvent + OVERFLOW_LOG_EVENT_WAIT_PERIOD))
9292
{
9393
mLastOverflowLogEvent = System.currentTimeMillis();
94-
mLog.warn("Temporary buffer overflow for thread [" + mThreadName + "] - throwing away samples");
94+
mLog.warn("Dispatcher - temporary buffer overflow for thread [" + mThreadName + "] - throwing away samples - " +
95+
" processor flag:" + (mRunning.get() ? "running" : "stopped") +
96+
" thread:" + (mThread != null ? (mThread.isAlive() ? mThread.getState() : "dead") : "null" ));
9597
}
9698
}
9799
}
@@ -185,6 +187,7 @@ else if(element != null)
185187
catch(InterruptedException e)
186188
{
187189
//Normal shutdown is by interrupt
190+
mRunning.set(false);
188191
}
189192
catch(Exception e)
190193
{

0 commit comments

Comments
 (0)