Skip to content

Commit 8c086d0

Browse files
updated IsConnected usages
1 parent b12fed5 commit 8c086d0

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

Assets/HoloToolkit/Sharing/Scripts/SharingStage.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -317,26 +317,21 @@ private void NetworkConnectionAdapter_ConnectedCallback(NetworkConnection obj)
317317

318318
private void SendConnectedNotification()
319319
{
320-
NetworkConnection serverConnection = Manager.GetServerConnection();
321-
if (serverConnection.IsConnected())
320+
if (IsConnected)
322321
{
323322
//Send notification that we're connected
324323
if (SharingManagerConnected != null)
325324
{
326325
SharingManagerConnected(this, EventArgs.Empty);
327326
}
328327
}
329-
else if (!serverConnection.IsConnected())
328+
else if (!IsConnected)
330329
{
331330
if (SharingManagerDisconnected != null)
332331
{
333332
SharingManagerDisconnected(this, EventArgs.Empty);
334333
}
335334
}
336-
else
337-
{
338-
Log.Error(string.Format("Cannot connect to server {0}:{1}", ServerAddress, ServerPort.ToString()));
339-
}
340335
}
341336

342337
private void AutoDiscoverInit()

0 commit comments

Comments
 (0)