<feed xmlns='http://www.w3.org/2005/Atom'>
<title>viewer.git/indra/llwebrtc, branch 26.4</title>
<subtitle>Megapahit's fork of the Second Life viewer.
</subtitle>
<id>https://megapahit.org/viewer.git/atom?h=26.4</id>
<link rel='self' href='https://megapahit.org/viewer.git/atom?h=26.4'/>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/'/>
<updated>2026-09-04T15:25:54Z</updated>
<entry>
<title>Merge tag 'Second_Life_Release#a4aa523-26.4' into 26.4</title>
<updated>2026-09-04T15:25:54Z</updated>
<author>
<name>Erik Kundiman</name>
<email>erik@megapahit.org</email>
</author>
<published>2026-09-04T15:09:56Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=7f8684301a716d23343cd6e85a4759f3a11546d4'/>
<id>urn:sha1:7f8684301a716d23343cd6e85a4759f3a11546d4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'secondlife/release/26.4' into 26.4</title>
<updated>2026-09-04T13:58:53Z</updated>
<author>
<name>Erik Kundiman</name>
<email>erik@megapahit.org</email>
</author>
<published>2026-09-01T10:35:23Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=00bb3bb6f07660bd914d29a1389342bb3060d254'/>
<id>urn:sha1:00bb3bb6f07660bd914d29a1389342bb3060d254</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#6228 fix setting the default device after a region change</title>
<updated>2026-09-02T11:19:15Z</updated>
<author>
<name>Maxim Nikolenko</name>
<email>maximnproductengine@lindenlab.com</email>
</author>
<published>2026-09-02T11:19:15Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=89f652a6d16e469da674397a8cee9d1071968610'/>
<id>urn:sha1:89f652a6d16e469da674397a8cee9d1071968610</id>
<content type='text'>
Patch contributed by TJ Hecklezz</content>
</entry>
<entry>
<title>#6109 StopRecording() crash</title>
<updated>2026-08-25T20:05:20Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>117672381+akleshchev@users.noreply.github.com</email>
</author>
<published>2026-08-25T19:15:09Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=4ef9f8f14b35ed388c294d53767a0dca0e890924'/>
<id>urn:sha1:4ef9f8f14b35ed388c294d53767a0dca0e890924</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#6167 fix WebRTC logging level</title>
<updated>2026-08-24T10:13:02Z</updated>
<author>
<name>Maxim Nikolenko</name>
<email>maximnproductengine@lindenlab.com</email>
</author>
<published>2026-08-24T10:13:02Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=1dce7c190ffffe4d935bea84ebd2daa28963b36c'/>
<id>urn:sha1:1dce7c190ffffe4d935bea84ebd2daa28963b36c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>#6123 Fix worker thread crash on termination</title>
<updated>2026-08-21T11:30:37Z</updated>
<author>
<name>Andrey Kleshchev</name>
<email>117672381+akleshchev@users.noreply.github.com</email>
</author>
<published>2026-08-20T19:47:07Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=d43bff52cdc6a6652d16b5d843ad6df310fa58e0'/>
<id>urn:sha1:d43bff52cdc6a6652d16b5d843ad6df310fa58e0</id>
<content type='text'>
</content>
</entry>
<entry>
<title>p#682 Fix shutdown crash and cut WebRTC teardown time</title>
<updated>2026-08-12T21:29:29Z</updated>
<author>
<name>Roxie Linden</name>
<email>roxie@lindenlab.com</email>
</author>
<published>2026-08-12T21:29:29Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=d4efc4f2aef0065f4238cc9b224eae807588ab62'/>
<id>urn:sha1:d4efc4f2aef0065f4238cc9b224eae807588ab62</id>
<content type='text'>
terminate() released the thread unique_ptrs on the timeout path while the
detached shutdown thread was still running the lambda that reads them, so a
slow shutdown became a null deref at the next BlockingCall.  Leave the members
alone and report the timeout instead, so the caller leaks this object rather
than deleting it out from under the detached thread.

Reduce how often that timeout is reached at all:

- Post the audio device stop instead of blocking on it.  StopRecording and
  StopPlayout each wait up to 2s on a WASAPI thread, spending much of the 10s
  budget before the connections were touched.  The device stop has to stay on
  the worker thread (AudioDeviceBuffer is guarded by a sequence checker bound
  to it), but the queue is FIFO, so ForceTerminate still runs after it while
  the signaling close gets on with its network-thread work.

- Drain the peer connections in LLWebRTCVoiceClient::terminate() before handing
  off to llwebrtc::terminate(), bounded to 3s.  An estate session can hold ten
  live connections -- the current region plus up to eight neighbours -- and
  closing them inline and serially under the shutdown budget is what made it
  tight.  Draining also quiets the stats poll, so PeerConnection::Close() no
  longer blocks in WaitForPendingRequest() on an in-flight GetStats.

Connections reaped by the drain are destroyed while webrtc is still fully
alive, so they must unregister and release their peer connections normally;
key the destructor's early-out off a new sWebRTCTerminated instead of
isShuttingDown().  Notify signaling observers even when there was no peer
connection to close, or a connection shut down before it finished initializing
parks in VOICE_STATE_WAIT_FOR_CLOSE, which has no timeout of its own.

Co-Authored-By: Claude Opus 5 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'Second_Life_Release#932e8ac3-26.3' into 26.3</title>
<updated>2026-08-07T23:01:40Z</updated>
<author>
<name>Erik Kundiman</name>
<email>erik@megapahit.org</email>
</author>
<published>2026-08-07T23:01:40Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=704cacceb57b8ca53acb25eecb981a4bdc2ecd04'/>
<id>urn:sha1:704cacceb57b8ca53acb25eecb981a4bdc2ecd04</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Merge tag 'Second_Life_Release#0686467f-26.3' into 26.3</title>
<updated>2026-08-07T02:24:49Z</updated>
<author>
<name>Erik Kundiman</name>
<email>erik@megapahit.org</email>
</author>
<published>2026-08-07T02:24:49Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=a20370141bb8840c24dbca18f4311aaf238348a8'/>
<id>urn:sha1:a20370141bb8840c24dbca18f4311aaf238348a8</id>
<content type='text'>
</content>
</entry>
<entry>
<title>p#682 Fix shutdown crash flushing peer connection stats</title>
<updated>2026-08-06T23:54:44Z</updated>
<author>
<name>Roxie Linden</name>
<email>roxie@lindenlab.com</email>
</author>
<published>2026-08-06T23:54:44Z</published>
<link rel='alternate' type='text/html' href='https://megapahit.org/viewer.git/commit/?id=8c5ec43ebc5c51372e2ebf4e3cb13faa7f1283e7'/>
<id>urn:sha1:8c5ec43ebc5c51372e2ebf4e3cb13faa7f1283e7</id>
<content type='text'>
LLWebRTCImpl::terminate() only posted the peer connection closes to the
signaling thread, so they ran behind the BlockingCall that releases the
factory -- after the factory and device module were gone, or not at all
if the thread was destroyed with the task still queued.

That matters for stats: PeerConnection::Close() flushes any in-flight
GetStats request and delivers the report inline, and our callback walks
mSignalingObserverList to hand it to the viewer.  By then the viewer's
LLVoiceWebRTCConnection objects have been destroyed -- on shutdown they
deliberately skip unsetSignalingObserver, on the assumption that
llwebrtc::terminate() already finished the job -- so the stats callback
reaches into freed memory.

Split the close out of LLWebRTCPeerConnectionImpl::terminate() into
closeOnSignalingThread() and run it from a BlockingCall, so connections
are closed and destroyed on the signaling thread before the factory, the
device module or the observers go away.  Also take ownership of the
connection list up front so the detached thread in the timeout path
isn't racing the main thread over it, clear the observer lists as part
of the close, and skip the observer notification for a stats report
delivered while shutting down.

Co-Authored-By: Claude Opus 5 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
