private void TerminateSaveResume() { using (var entry = _torrentSession.save_state(0xfffffff)) { var data = Core.Util.bencode(entry); File.WriteAllBytes(".session_state", data); } //_torrentSession?.Dispose(); //_torrentSession = null; }