-
-
Notifications
You must be signed in to change notification settings - Fork 92
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
Concurrency issues when creating a connection #171
Comments
Hi @hateeyan Thanks for reporting this. I see now issue. I think this needs fix on way transport connection pool is used. Adding into list to fix |
NOTE: Issue is only related for fixed IP. Recommendation is to build listener first. @hateeyan Have you tried approach creating listener first, and then reusing his IP? |
@hateeyan yes I understand. It makes sense for non dialogs, but in dialogs you need to listen. |
When using
DialogUA
to send Invite concurrently, the connection will be created multiple times.The log shows that the connection was created multiple times. Because the port was already bound, one of the requests failed.
We may need to add a mutex in
CreateConnection
and check whether the connection has been created by another goroutine.sipgo/sip/transport_layer.go
Lines 396 to 401 in 4cd2184
The text was updated successfully, but these errors were encountered: