Skip to content

OnClientDisconnectCallback not triggered if server disconnects client #2064

@daalen

Description

@daalen

Description

When the server disconnects a client through NetworkManager.Singleton.DisconnectClient([clientId]), OnClientDisconnectCallback is not triggered. It is triggered when the client disconnects itself.

Reproduce Steps

  1. Subscribe to NetworkManager.Singleton.OnClientDisconnectCallback
  2. On the server, call NetworkManager.Singleton.DisconnectClient([clientId]) with [clientId] any client that is not the server

Actual Outcome

The function subscribed to OnClientDisconnectCallback is not called.

Expected Outcome

The function subscribed to OnClientDisconnectCallback is always called, regardless of how the client got disconnected.

Environment

  • OS: macOS Big Sur
  • Unity Version: 2022.1.8f1
  • Netcode Version: 1.0.0

Additional Context

Possibly related to #795

Metadata

Metadata

Labels

priority:highThis issue has high priority and we are focusing to resolve itstat:importedStatus - Issue is tracked internally at Unitytype:bugBug Reporttype:docsDocs feedback or issue

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions