Thread.dumpStack() circumvents whatever logging is configured and writes
directly to stderr. Logging an exception with the associated warning does the right thing and logs the stack trace via the logging system. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5318 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -166,8 +166,7 @@ public abstract class Connection implements NetEventHandler
|
||||
{
|
||||
// we shouldn't be closed twice
|
||||
if (isClosed()) {
|
||||
log.warning("Attempted to re-close connection " + this + ".");
|
||||
Thread.dumpStack();
|
||||
log.warning("Attempted to re-close connection " + this + ".", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -186,8 +185,7 @@ public abstract class Connection implements NetEventHandler
|
||||
{
|
||||
// if we're already closed, then something is seriously funny
|
||||
if (isClosed()) {
|
||||
log.warning("Failure reported on closed connection " + this + ".");
|
||||
Thread.dumpStack();
|
||||
log.warning("Failure reported on closed connection " + this + ".", new Exception());
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user