11 Commits

Author SHA1 Message Date
Joe Turki
740e5166c5 Update lint rules, force testify/assert for tests
Use testify's assert package instead of the standard library's testing
package.
2025-03-27 12:08:37 +02:00
Sean DuBois
e4ff415b2b Support DataChannel messages larger then MaxUint16
SCTP now internally can handle larger messages

Resolves #2712
2025-03-04 18:22:14 -08:00
Joe Turki
feeeebf251 Upgrade golangci-lint, more linters
Introduces new linters, upgrade golangci-lint to version (v1.63.4)
2025-01-18 07:16:06 -06:00
sukun
b82306ab62 Fix detached datachannels handling
https://github.com/pion/webrtc/pull/2696 introduced removing
datachannels from the sctptransport for better garbage collection.

That PR introduced a race condition for data channels created before
connection establishment. When an out of band negotiated data channel,
created before peerconnection establishment is detached, there's a race
between the data channel being removed from `r.dataChannels` and it
being copied in to the existing data channel slice in the
acceptDataChannels goroutine.

This PR fixes this race by copying the slice before any datachannels
could be detached.
2024-12-24 17:00:21 +00:00
sukun
1e76a83d1a Fix SCTPTransport OnClose test 2024-08-13 20:48:56 +05:30
sukun
6cfa00f1bc Provide SCTP Association OnClose callback 2024-08-12 22:15:39 +05:30
sukun
835ac3b08e Drop reference to detached datachannels
This allows users of detached datachannels to garbage collect
resources associated with the datachannel and the sctp stream.
There is no functional change here.
2024-03-24 22:21:35 -04:00
Steffen Vogel
683fc837d0 Make repo REUSE compliant 2023-05-05 11:58:49 -04:00
Sean DuBois
157220e800 Run gofmt to add new build constraints
Also remove some 1.13 specific WASM code
2022-01-17 22:36:01 -05:00
Atsushi Watanabe
58338965b2 Fix DataChannel open race
Concurrent call of generateDataChannelID caused data race.
2020-03-28 15:15:21 -07:00
Sean DuBois
721b342e2e Properly generate DataChannel streamId
Before we computed DataChannel IDs before signaling, this
is incorrect because IDs must take into account if we are
running an DTLS Client or Server.

This updates the DataChannel ID generation code to take this
into account before generating a streamId.

Resolves #908
2019-11-14 10:51:05 -08:00