ResponseManager now uses a special TimeoutException instead of generic exception.
This commit is contained in:
parent
46cb174183
commit
2a8ac38e55
|
@ -0,0 +1,21 @@
|
|||
/*
|
||||
* Copyright 2023 dorkbox, llc
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package dorkbox.network.exceptions
|
||||
|
||||
class TimeoutException: Exception() {
|
||||
|
||||
}
|
|
@ -38,7 +38,7 @@ import kotlin.concurrent.write
|
|||
*/
|
||||
internal class ResponseManager(maxValuesInCache: Int = 65534, minimumValue: Int = 2) {
|
||||
companion object {
|
||||
val TIMEOUT_EXCEPTION = Exception().apply { stackTrace = arrayOf<StackTraceElement>() }
|
||||
val TIMEOUT_EXCEPTION = TimeoutException().apply { stackTrace = arrayOf<StackTraceElement>() }
|
||||
}
|
||||
|
||||
private val rmiWaitersInUse = atomic(0)
|
||||
|
|
Loading…
Reference in New Issue