private bool is_shutteddown = false;//Damn knows what the mistake is, but I'm too lazy to fix it... (See Shutdown()) public void Shutdown() { if (pointer == IntPtr.Zero || is_shutteddown) { return; } is_shutteddown = true; RakPeer_Native.NET_Shutdown(pointer); }