Skip to content

chore: Buffer remote candidates like local #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 25 commits into from
Jan 27, 2022
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
310eb82
chore: Buffer remote candidates like local
kylecarbs Jan 27, 2022
b874a1e
Use local description instead
kylecarbs Jan 27, 2022
411542a
Add logging for candidate flush
kylecarbs Jan 27, 2022
90e00db
Fix race with atomic bool
kylecarbs Jan 27, 2022
85e6def
Simplify locks
kylecarbs Jan 27, 2022
7f26a99
Add mutex to flush
kylecarbs Jan 27, 2022
a56560b
Reset buffer
kylecarbs Jan 27, 2022
58445d5
Remove leak dependency to limit confusion
kylecarbs Jan 27, 2022
6a07a99
Fix ordering
kylecarbs Jan 27, 2022
3272e13
Revert channel close
kylecarbs Jan 27, 2022
877ae59
Flush candidates after remote session description is set
kylecarbs Jan 27, 2022
1e6a923
Bump up count to ensure race is fixed
kylecarbs Jan 27, 2022
0c02c78
Use custom ICE dependency
kylecarbs Jan 27, 2022
0439e23
Fix data race
kylecarbs Jan 27, 2022
a8b5a07
Lower timeout to make for fast CI
kylecarbs Jan 27, 2022
d74f454
Add back mutex to prevent race
kylecarbs Jan 27, 2022
b613b6d
Improve debug logging
kylecarbs Jan 27, 2022
ba878ca
Lock on local description
kylecarbs Jan 27, 2022
ef41921
Flush local candidates uniquely
kylecarbs Jan 27, 2022
3515fe7
Fix race
kylecarbs Jan 27, 2022
fbe847c
Move mutex to prevent candidate send race
kylecarbs Jan 27, 2022
7321303
Move lock to handshake so no race can occur
kylecarbs Jan 27, 2022
bebc74d
Reduce timeout to improve test times
kylecarbs Jan 27, 2022
48078d2
Move unlock to defer
kylecarbs Jan 27, 2022
5021b95
Use flushed bool instead of checking remote
kylecarbs Jan 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix data race
  • Loading branch information
kylecarbs committed Jan 27, 2022
commit 0439e23f24bc51a3da2eec709b09294e6ca1ea91
8 changes: 4 additions & 4 deletions peer/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,17 +271,17 @@ func (c *Channel) closeWithError(err error) error {
} else {
c.closeError = err
}
if c.rwc != nil {
_ = c.rwc.Close()
}
_ = c.dc.Close()

close(c.closed)
close(c.sendMore)
c.conn.dcDisconnectListeners.Sub(1)
c.conn.dcFailedListeners.Sub(1)
c.conn.dcClosedWaitGroup.Done()

if c.rwc != nil {
_ = c.rwc.Close()
}
_ = c.dc.Close()
return err
}

Expand Down