Repository: pion/ice
Pull request #321 (2021-01-04 02:20:06)

Update module pion/transport to v0.12.2
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [github.com/pion/transport](https://togithub.com/pion/transport) | require | patch | `v0.12.1` -> `v0.12.2` |

---

### Release Notes

<details>
<summary>pion/transport</summary>

### [`v0.12.2`](https://togithub.com/pion/transport/compare/v0.12.1...v0.12.2)

[Compare Source](https://togithub.com/pion/transport/compare/v0.12.1...v0.12.2)

</details>

---

### Renovate configuration

:date: **Schedule**: At any time (no schedule defined).

:vertical_traffic_light: **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

:recycle: **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

:no_bell: **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/pion/ice).

codecov[bot]: # [Codecov](https://codecov.io/gh/pion/ice/pull/321?src=pr&el=h1) Report
> Merging [#321](https://codecov.io/gh/pion/ice/pull/321?src=pr&el=desc) (94f6ae5) into [master](https://codecov.io/gh/pion/ice/commit/9ba22cf71da5ceb2580e11b33dc7feeeb30d7693?el=desc) (9ba22cf) will **decrease** coverage by `50.50%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pion/ice/pull/321/graphs/tree.svg?width=650&height=150&src=pr&token=1ivIyHDzva)](https://codecov.io/gh/pion/ice/pull/321?src=pr&el=tree)

```diff
@@             Coverage Diff             @@
##           master     #321       +/-   ##
===========================================
- Coverage   79.32%   28.82%   -50.51%     
===========================================
  Files          31       31               
  Lines        2297     2297               
===========================================
- Hits         1822      662     -1160     
- Misses        336     1607     +1271     
+ Partials      139       28      -111     
```

| Flag | Coverage Δ | |
|---|---|---|
| go | `?` | |
| wasm | `28.82% <ø> (ø)` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags#carryforward-flags-in-the-pull-request-comment) to find out more.

| [Impacted Files](https://codecov.io/gh/pion/ice/pull/321?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [candidate\_peer\_reflexive.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-Y2FuZGlkYXRlX3BlZXJfcmVmbGV4aXZlLmdv) | `0.00% <0.00%> (-84.62%)` | :arrow_down: |
| [agent\_config.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-YWdlbnRfY29uZmlnLmdv) | `0.00% <0.00%> (-84.38%)` | :arrow_down: |
| [transport.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-dHJhbnNwb3J0Lmdv) | `0.00% <0.00%> (-82.70%)` | :arrow_down: |
| [agent\_stats.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-YWdlbnRfc3RhdHMuZ28=) | `0.00% <0.00%> (-82.36%)` | :arrow_down: |
| [agent.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-YWdlbnQuZ28=) | `0.00% <0.00%> (-81.79%)` | :arrow_down: |
| [stun.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-c3R1bi5nbw==) | `0.00% <0.00%> (-75.00%)` | :arrow_down: |
| [selection.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-c2VsZWN0aW9uLmdv) | `0.00% <0.00%> (-74.63%)` | :arrow_down: |
| [gather.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-Z2F0aGVyLmdv) | `0.00% <0.00%> (-70.39%)` | :arrow_down: |
| [mdns.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-bWRucy5nbw==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| [context.go](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree#diff-Y29udGV4dC5nbw==) | `0.00% <0.00%> (-66.67%)` | :arrow_down: |
| ... and [9 more](https://codecov.io/gh/pion/ice/pull/321/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pion/ice/pull/321?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pion/ice/pull/321?src=pr&el=footer). Last update [9ba22cf...94f6ae5](https://codecov.io/gh/pion/ice/pull/321?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/README.md b/README.md
index 788a292..cbb55fd 100644
--- a/README.md
+++ b/README.md
@@ -61,6 +61,7 @@ Check out the **[contributing wiki](https://github.com/pion/webrtc/wiki/Contribu
 * [ZHENK](https://github.com/scorpionknifes)
 * [Assad Obaid](https://github.com/assadobaid)
 * [Antoine Baché](https://github.com/Antonito)
+* [Will Forcey](https://github.com/wawesomeNOGUI)
 
 ### License
 MIT License - see [LICENSE](LICENSE) for full text
diff --git a/candidatepair.go b/candidatepair.go
index 00f904e..49dec37 100644
--- a/candidatepair.go
+++ b/candidatepair.go
@@ -26,6 +26,10 @@ type candidatePair struct {
 }
 
 func (p *candidatePair) String() string {
+	if p == nil {
+		return ""
+	}
+
 	return fmt.Sprintf("prio %d (local, prio %d) %s <-> %s (remote, prio %d)",
 		p.Priority(), p.local.Priority(), p.local, p.remote, p.remote.Priority())
 }
diff --git a/go.mod b/go.mod
index 83ab575..4daf06e 100644
--- a/go.mod
+++ b/go.mod
@@ -3,13 +3,13 @@ module github.com/pion/ice/v2
 go 1.13
 
 require (
-	github.com/google/uuid v1.1.3
+	github.com/google/uuid v1.1.5
 	github.com/pion/dtls/v2 v2.0.4
 	github.com/pion/logging v0.2.2
 	github.com/pion/mdns v0.0.4
 	github.com/pion/randutil v0.1.0
 	github.com/pion/stun v0.3.5
-	github.com/pion/transport v0.12.1
+	github.com/pion/transport v0.12.2
 	github.com/pion/turn/v2 v2.0.5
 	github.com/stretchr/testify v1.6.1
 	golang.org/x/net v0.0.0-20201201195509-5d6afe98e0b7
diff --git a/go.sum b/go.sum
index 6c98f87..317ce5b 100644
--- a/go.sum
+++ b/go.sum
@@ -1,7 +1,7 @@
 github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
-github.com/google/uuid v1.1.3 h1:twObb+9XcuH5B9V1TBCvvvZoO6iEdILi2a76PYn5rJI=
-github.com/google/uuid v1.1.3/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.1.5 h1:kxhtnfFVi+rYdOALN0B3k9UT86zVJKfBimRaciULW4I=
+github.com/google/uuid v1.1.5/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/pion/dtls/v2 v2.0.4 h1:WuUcqi6oYMu/noNTz92QrF1DaFj4eXbhQ6dzaaAwOiI=
 github.com/pion/dtls/v2 v2.0.4/go.mod h1:qAkFscX0ZHoI1E07RfYPoRw3manThveu+mlTDdOxoGI=
 github.com/pion/logging v0.2.2 h1:M9+AIj/+pxNsDfAT64+MAVgJO0rsyLnoJKCqf//DoeY=
@@ -16,8 +16,8 @@ github.com/pion/transport v0.8.10/go.mod h1:tBmha/UCjpum5hqTWhfAEs3CO4/tHSg0MYRh
 github.com/pion/transport v0.10.0/go.mod h1:BnHnUipd0rZQyTVB2SBGojFHT9CBt5C5TcsJSQGkvSE=
 github.com/pion/transport v0.10.1 h1:2W+yJT+0mOQ160ThZYUx5Zp2skzshiNgxrNE9GUfhJM=
 github.com/pion/transport v0.10.1/go.mod h1:PBis1stIILMiis0PewDw91WJeLJkyIMcEk+DwKOzf4A=
-github.com/pion/transport v0.12.1 h1:6v8lxQGVZpwSICEZjhl/CCv6aErINZlrm3O5ncFXj/c=
-github.com/pion/transport v0.12.1/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
+github.com/pion/transport v0.12.2 h1:WYEjhloRHt1R86LhUKjC5y+P52Y11/QqEUalvtzVoys=
+github.com/pion/transport v0.12.2/go.mod h1:N3+vZQD9HlDP5GWkZ85LohxNsDcNgofQmyL6ojX5d8Q=
 github.com/pion/turn/v2 v2.0.5 h1:iwMHqDfPEDEOFzwWKT56eFmh6DYC6o/+xnLAEzgISbA=
 github.com/pion/turn/v2 v2.0.5/go.mod h1:APg43CFyt/14Uy7heYUOGWdkem/Wu4PhCO/bjyrTqMw=
 github.com/pion/udp v0.1.0 h1:uGxQsNyrqG3GLINv36Ff60covYmfrLoxzwnCsIYspXI=


Test patch:
diff --git a/agent_test.go b/agent_test.go
index 3377729..7a6261a 100644
--- a/agent_test.go
+++ b/agent_test.go
@@ -1694,3 +1694,11 @@ func TestNilCandidate(t *testing.T) {
 	assert.NoError(t, a.AddRemoteCandidate(nil))
 	assert.NoError(t, a.Close())
 }
+
+func TestNilCandidatePair(t *testing.T) {
+	a, err := NewAgent(&AgentConfig{})
+	assert.NoError(t, err)
+
+	a.setSelectedPair(nil)
+	assert.NoError(t, a.Close())
+}
diff --git a/candidatepair_test.go b/candidatepair_test.go
index 12a4c38..1d817c1 100644
--- a/candidatepair_test.go
+++ b/candidatepair_test.go
@@ -1,6 +1,10 @@
 package ice
 
-import "testing"
+import (
+	"testing"
+
+	"github.com/stretchr/testify/assert"
+)
 
 func hostCandidate() *CandidateHost {
 	return &CandidateHost{
@@ -122,3 +126,8 @@ func TestCandidatePairEquality(t *testing.T) {
 		t.Fatalf("Expected %v to equal %v", pairA, pairB)
 	}
 }
+
+func TestNilCandidatePairString(t *testing.T) {
+	var nilCandidatePair *candidatePair
+	assert.Equal(t, nilCandidatePair.String(), "")
+}