From 899e5ae979c2bebda2f7a666dd8c6b3881ea4c5f Mon Sep 17 00:00:00 2001 From: Thor Date: Fri, 13 Oct 2017 10:37:34 +0200 Subject: [PATCH] Fixed Clear all connections bug --- Scripts/NodePort.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Scripts/NodePort.cs b/Scripts/NodePort.cs index f36be55..808fabd 100644 --- a/Scripts/NodePort.cs +++ b/Scripts/NodePort.cs @@ -102,8 +102,8 @@ public class NodePort { } public void ClearConnections() { - for (int i = 0; i < connections.Count; i++) { - Disconnect(connections[i].Port); + while(connections.Count > 0) { + Disconnect(connections[0].Port); } }