PING cancelRequest now uses send(), so that events are processed in order (instead of concurrently)
This commit is contained in:
parent
eb0e59b7ba
commit
460840fad3
@ -183,8 +183,8 @@ internal class ResponseManager(maxValuesInCache: Int = 65535, minimumValue: Int
|
|||||||
/**
|
/**
|
||||||
* Cancels the RMI request in the given timeout, the callback is executed inside the read lock
|
* Cancels the RMI request in the given timeout, the callback is executed inside the read lock
|
||||||
*/
|
*/
|
||||||
fun cancelRequest(eventDispatch: EventDispatcher, timeoutMillis: Long, id: Int, logger: KLogger, onCancelled: ResponseWaiter.() -> Unit) {
|
suspend fun cancelRequest(eventDispatch: EventDispatcher, timeoutMillis: Long, id: Int, logger: KLogger, onCancelled: ResponseWaiter.() -> Unit) {
|
||||||
eventDispatch.launch {
|
eventDispatch.send {
|
||||||
delay(timeoutMillis) // this will always wait. if this job is cancelled, this will immediately stop waiting
|
delay(timeoutMillis) // this will always wait. if this job is cancelled, this will immediately stop waiting
|
||||||
|
|
||||||
// check if we have a result or not
|
// check if we have a result or not
|
||||||
|
Loading…
Reference in New Issue
Block a user