-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Remove direct usage of unexported fields in ICETransport #659
Conversation
42bb6e5
to
8e1927c
Compare
Hey @masterada Want to tag+bump |
8e1927c
to
afaeb17
Compare
you got to be kidding me :D |
afaeb17
to
66105ae
Compare
icetransport.go
Outdated
} | ||
|
||
return nil | ||
if t.state != ICETransportStateClosed { |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@masterada correct me if I am wrong, but this feels a bit tech debty to me. I think this would possibly be the right solution (and I can help!)
- Move
ICETransportState
to a atomic. Then we don't have to worry about mutex juggling - Fix
pion/ice
to properly emit state
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
atomic - good idea
fix pion/ice - already created an issue for that and assigned myself, although im not sure when i will have time for it, not sure how hard it will be to write tests for it
there is still a question: do we need to make sure that once Close() call returns, State() will return closed (because if we wait for the agent's event to set the closed state for the transport, this will not be the case)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor change! Otherwise LGTM!
66105ae
to
feb2030
Compare
b6c1315
to
9d611ba
Compare
There are some direct usages of unexported fields of ICETransport from non ice-related methods. This would be problematic when ice once ice related code is moved to a separate packet. Added proxy methods to ICETransport to avoid this.
9d611ba
to
9f2bd3a
Compare
There are some direct usages of unexported fields of ICETransport
from non ice-related methods. This would be problematic when ice
once ice related code is moved to a separate packet. Added proxy
methods to ICETransport to avoid this.
Reference issue
Rel #646