()
| 298 | } |
| 299 | |
| 300 | function keepBaseline() { |
| 301 | const pinned = backend |
| 302 | |
| 303 | if (!pinned || polled.headKey !== '') { |
| 304 | return |
| 305 | } |
| 306 | |
| 307 | void pinned |
| 308 | .headKeyOf() |
| 309 | .catch(() => '') |
| 310 | .then(key => { |
| 311 | const isFirst = backend === pinned && polled.headKey === '' |
| 312 | |
| 313 | if (isFirst) { |
| 314 | polled.headKey = key |
| 315 | } |
| 316 | }) |
| 317 | } |
| 318 | |
| 319 | function startPoll(engine: Host, pinned: Backend.Backend) { |
| 320 | const readHeadKey = () => pinned.headKeyOf().catch(() => '') |