From c2eb54409622006a34dbe87a15331b9133768feb Mon Sep 17 00:00:00 2001 From: Emiliana <38952746+emilianavt@users.noreply.github.com> Date: Sun, 16 Feb 2020 01:46:35 +0100 Subject: [PATCH] The UDP socket is now actually closed when the OpenSee component is destroyed. --- Unity/OpenSee.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Unity/OpenSee.cs b/Unity/OpenSee.cs index a95264d..f3bfab3 100644 --- a/Unity/OpenSee.cs +++ b/Unity/OpenSee.cs @@ -187,6 +187,8 @@ public class OpenSee : MonoBehaviour { receiveThread.Join(); stopReception = false; } + if (socket != null) + socket.Close(); } }