Skip to content

fix: shutting down properly, when failing to StartHost or StartClient#1918

Merged
jeffreyrainy merged 1 commit intodevelopfrom
fix/StartHost-after-bind-error
Apr 29, 2022
Merged

fix: shutting down properly, when failing to StartHost or StartClient#1918
jeffreyrainy merged 1 commit intodevelopfrom
fix/StartHost-after-bind-error

Conversation

@jeffreyrainy
Copy link
Copy Markdown
Contributor

Shutting down properly, when failing to StartHost or StartClient. This allows the next attempt to not fail automatically.

MTT-3421

…. This allows the next attempt to not fail automatically.
@simon-lemay-unity
Copy link
Copy Markdown
Contributor

I'm not against this change, but won't the NetworkManager call the transport's Shutdown method if StartClient or StartServer fail? If it doesn't, shouldn't it?

@jeffreyrainy
Copy link
Copy Markdown
Contributor Author

I'm not against this change, but won't the NetworkManager call the transport's Shutdown method if StartClient or StartServer fail? If it doesn't, shouldn't it?

Yes, it does, but it's not enough to allow re-hosting. It's two-layer. To host again, both the NetworkManager and the m_Driver must be in the right state. Each can individually error out.

@simon-lemay-unity
Copy link
Copy Markdown
Contributor

Ah right, I see the issue. NetworkManager only calls the transport's Shutdown if IsListening is true. And that isn't the case when the transport's StartClient or StartServer have failed.

@jeffreyrainy jeffreyrainy merged commit 309ad7f into develop Apr 29, 2022
@jeffreyrainy jeffreyrainy deleted the fix/StartHost-after-bind-error branch April 29, 2022 19:15
jeffreyrainy added a commit that referenced this pull request May 4, 2022
…. This allows the next attempt to not fail automatically. (#1918)
ashwinimurt pushed a commit that referenced this pull request May 5, 2022
…1930)

* fix: NetworkList serialization sends the list values before the cached updates, to prevent duplicate application (#1917)

* fix: shutting down properly, when failing to StartHost or StartClient. This allows the next attempt to not fail automatically. (#1918)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants