mirror of
https://github.com/jetty/jetty.project.git
synced 2025-02-24 08:28:54 +00:00
Hightlighting double-close issue better in logs
This commit is contained in:
parent
8d18118688
commit
03afcc8487
@ -112,9 +112,13 @@ public abstract class AbstractTrackingEndpoint<T>
|
||||
LOG.debug("onWSClose({}, {})", statusCode, reason);
|
||||
}
|
||||
CloseInfo close = new CloseInfo(statusCode, reason);
|
||||
boolean closeTracked = closeInfo.compareAndSet(null, close);
|
||||
if (closeInfo.compareAndSet(null, close) == false)
|
||||
{
|
||||
LOG.warn("onClose should only happen once - Original Close: " + closeInfo.get());
|
||||
LOG.warn("onClose should only happen once - Extra/Excess Close: " + close);
|
||||
fail("onClose should only happen once!");
|
||||
}
|
||||
this.closeLatch.countDown();
|
||||
assertTrue("Close only happened once", closeTracked);
|
||||
}
|
||||
|
||||
protected void onWSError(Throwable cause)
|
||||
|
Loading…
x
Reference in New Issue
Block a user