.
This commit is contained in:
1 parent
7dbbf22515
commit
499890cdaa
6 files changed
+35
-3
No files matched your search
@@ -7,7 +7,7 @@ import type {
|
||||
ClockEstimate,
|
||||
ReservationRequest,
|
||||
} from '../../src/type/reservation'
|
||||
import { executeReservation } from './reservation'
|
||||
import { executeReservation, executeReservationConcurrent } from './reservation'
|
||||
import { serverClock } from './server-clock'
|
||||
import { computePlannedSendAtMs } from './server-clock-core'
|
||||
|
||||
@@ -60,7 +60,7 @@ export class AutoSalvoService {
|
||||
getEstimate(): ClockEstimate
|
||||
setAutoTarget(targetServerTimeMs?: number): void
|
||||
} = serverClock,
|
||||
private readonly execute: (request: ReservationRequest) => Promise<Awaited<ReturnType<typeof executeReservation>>> = executeReservation,
|
||||
private readonly execute: (request: ReservationRequest) => Promise<Awaited<ReturnType<typeof executeReservation>>> = executeReservationConcurrent,
|
||||
private readonly emitState: (state: AutoSalvoState) => void = broadcast,
|
||||
) {}
|
||||
|
||||
@@ -228,6 +228,7 @@ export class AutoSalvoService {
|
||||
arrivalErrorMs: estimatedArrivalServerMs === undefined ? undefined : estimatedArrivalServerMs - next.attempt.effectiveTargetServerMs,
|
||||
rttMs: transport?.rttMs,
|
||||
httpStatus: transport?.httpStatus,
|
||||
serverDateMs: transport?.observedServerDateMs,
|
||||
})
|
||||
if (result.success) {
|
||||
this.state = { ...this.state, succeededIndex: next.attempt.index, result }
|
||||
|
||||
Reference in new issue
Block a user