Skip to content

Commit

Permalink
Make connection warning persistent during reconnect attempts
Browse files Browse the repository at this point in the history
  • Loading branch information
bnco-dev committed Aug 20, 2024
1 parent b1019b8 commit 8435355
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions Unity/Assets/Ubiq/Runtime/Rooms/RoomClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ public IEnumerable<IPeer> Peers
public static readonly float HeartbeatInterval = 1f;
public static readonly float HeartbeatWarningThreshold = 5f;
public static readonly float HeartbeatTimeoutThreshold = 10.0f;

public TimeoutBehaviour timeoutBehaviour = TimeoutBehaviour.ReconnectAndRejoin;

private PeerInterfaceFriend me = new PeerInterfaceFriend(Guid.NewGuid().ToString());
Expand Down Expand Up @@ -705,9 +705,8 @@ public void Reconnect(bool rejoin)
OnPeerRemoved.Invoke(peer);
}

// Reset ping
// Reset ping so we have a small window before we try again
pingReceived = Time.realtimeSinceStartup;
PlayerNotifications.Delete(ref notification);

// Reconnect all connections
foreach (var server in servers)
Expand Down
4 changes: 2 additions & 2 deletions Unity/Assets/Ubiq/Samples/Demo (XRI)/Demo.unity
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ GameObject:
m_Component:
- component: {fileID: 261526883}
m_Layer: 0
m_Name: Ubiq Interactables
m_Name: Ubiq Interactables (XRI)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
Expand Down Expand Up @@ -1488,6 +1488,6 @@ SceneRoots:
- {fileID: 1995168927}
- {fileID: 8839457145026391851}
- {fileID: 1925563522}
- {fileID: 742749608137116523}
- {fileID: 261526883}
- {fileID: 742749608137116523}
- {fileID: 2065098753}

0 comments on commit 8435355

Please sign in to comment.