446923 SharedBlockingCallback does not handle connector max idle time of Long.MAX_VALUE; BlockerTimeoutException not serializable
This commit is contained in:
parent
8a555e669a
commit
1729fb045c
|
@ -102,7 +102,7 @@ public class SharedBlockingCallback
|
||||||
{
|
{
|
||||||
while (_blocker._state != IDLE)
|
while (_blocker._state != IDLE)
|
||||||
{
|
{
|
||||||
if (idle>0)
|
if (idle>0 && (idle < Long.MAX_VALUE/2))
|
||||||
{
|
{
|
||||||
// Wait a little bit longer than the blocker might block
|
// Wait a little bit longer than the blocker might block
|
||||||
if (!_idle.await(idle*2,TimeUnit.MILLISECONDS))
|
if (!_idle.await(idle*2,TimeUnit.MILLISECONDS))
|
||||||
|
@ -207,7 +207,7 @@ public class SharedBlockingCallback
|
||||||
{
|
{
|
||||||
while (_state == null)
|
while (_state == null)
|
||||||
{
|
{
|
||||||
if (idle>0)
|
if (idle>0 && (idle < Long.MAX_VALUE/2))
|
||||||
{
|
{
|
||||||
// Wait a little bit longer than expected callback idle timeout
|
// Wait a little bit longer than expected callback idle timeout
|
||||||
if (!_complete.await(idle+idle/2,TimeUnit.MILLISECONDS))
|
if (!_complete.await(idle+idle/2,TimeUnit.MILLISECONDS))
|
||||||
|
@ -296,7 +296,7 @@ public class SharedBlockingCallback
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class BlockerTimeoutException extends TimeoutException
|
private static class BlockerTimeoutException extends TimeoutException
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue