Cancel previous gathering routine on restart

Updated ICE agent restart method to cancel the
current gathering and then restart the candidate
gathering process.
This commit is contained in:
Will Forcey
2021-01-24 11:54:32 -05:00
committed by Steffen Vogel
parent 7f2d498367
commit 9ab8f71673
3 changed files with 21 additions and 12 deletions

View File

@@ -97,9 +97,6 @@ var (
// ErrInvalidMulticastDNSHostName indicates an invalid MulticastDNSHostName
ErrInvalidMulticastDNSHostName = errors.New("invalid mDNS HostName, must end with .local and can only contain a single '.'")
// ErrRestartWhenGathering indicates Restart was called when Agent is in GatheringStateGathering
ErrRestartWhenGathering = errors.New("ICE Agent can not be restarted when gathering")
// ErrRunCanceled indicates a run operation was canceled by its individual done
ErrRunCanceled = errors.New("run was canceled by done")