Skip to content

When NetworkManager.StartHost() is called with invalid ConnectionData in Unity Transport, the NetworkManager is irrecoverably shutdown #1924

@tangx246

Description

@tangx246

Description

If we call NetworkManager.StartHost() and it fails to connect due to invalid IP address format (e.g. "127.0.0."), then the NetworkManager shuts itself down and seems to be unable to retry a connection even if the ConnectionData is fixed

Reproduce Steps

  1. Have a NetworkManager
  2. Add a Unity Transport
  3. Set ConnectionData.Address to "127.0.0." (invalid IP address)
  4. Call NetworkManager.StartHost()
  5. Set ConnectionData.Address to "127.0.0.1"
  6. Call NetworkManager.StartHost()

Actual Outcome

StartHost() fails and there appears to be a memory leak as well

Expected Outcome

StartHost() is successful

Screenshots

image

Environment

  • OS: Windows 10
  • Unity Version: 2021.3.1
  • Netcode Version: 1.0.0-pre.8

Metadata

Metadata

Labels

priority:mediumThis issue has medium priority and may take some time to be resolvedstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Report

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions