An update, in case it is useful to anyone else and to whoever picks up
FB24377808.
We have a workaround. The revocation appears to be scheduled relative to the
most recent activate(options:completionHandler:), and a subsequent activate
replaces the pending revocation rather than adding another. So activating
again before the deadline moves it, indefinitely.
Isolated in a minimal app — one .playAndRecord activate, one NWConnection
to www.apple.com, an NWPathMonitor, and nothing else. Activating a second
time 20 s in:
16:29:46 session activated (activate #1)
16:29:47 connection: ready
16:30:08 --- re-activating at 20s, without deactivating ---
16:30:08 session activated (activate #2)
16:30:44 path: unsatisfied
16:30:44 REVOKED — since each activate: #1:58.1s #2:36.5s
The revocation lands 36.5 s after activate #2. The deadline implied by
activate #1 — which would have been 16:30:22 — does not fire. Note also that
the connection stayed ready across activate #2: the re-activation itself
disturbs neither the path nor an open connection.
Renewing on a 30 s timer, the same app ran 140 s across four renewals with no
revocation, where it had never previously survived 37 s. In our real app —
live microphone, AVAudioEngine running, audio actually flowing — a watch held
one WebSocket for 11 minutes 30 seconds with zero reconnections, while a
second watch on the previous build reconnected roughly every 36 s throughout,
on the same network and relay.
Two things I would still ask for:
This is undocumented behaviour we are now depending on. Nothing
promises that an activate supersedes a pending revocation, so a future
watchOS release could change it and silently return us to a drop every 36 s.
A supported way to hold the TN3135 networking grant — or the leniency fix —
is still what we need.
It may be worth checking whether this points at the cause. That the
deadline is per-activate and replaceable suggests a single timer armed on
activation, rather than an audit of session activity. If so, an app that
never re-activates is guaranteed to lose networking at ~36.5 s no matter how
correctly it behaves — which is the case we originally reported.
Happy to attach a sysdiagnose of the working case if that would help.
Topic:
Media Technologies
SubTopic:
Audio
Tags: