File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed
Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,15 @@ FusionTorService _getFusionInterface() => throw Exception("TOR not enabled!");
2121
2222//END_OFF
2323//ON
24- TorService _getInterface () => _TorServiceImpl () ;
25- FusionTorService _getFusionInterface () => _FusionTorServiceImpl () ;
24+ TorService _getInterface () => _TorServiceImpl .instance ;
25+ FusionTorService _getFusionInterface () => _FusionTorServiceImpl .instance ;
2626
2727class _TorServiceImpl extends TorService {
28+ static _TorServiceImpl ? _instance;
29+ static _TorServiceImpl get instance => _instance ?? = _TorServiceImpl ._();
30+
31+ _TorServiceImpl ._();
32+
2833 Tor ? _tor;
2934 String ? _torDataDirPath;
3035 TorConnectionStatus _status = TorConnectionStatus .disconnected;
@@ -131,6 +136,12 @@ class _TorServiceImpl extends TorService {
131136}
132137
133138class _FusionTorServiceImpl extends FusionTorService {
139+ static _FusionTorServiceImpl ? _instance;
140+ static _FusionTorServiceImpl get instance =>
141+ _instance ?? = _FusionTorServiceImpl ._();
142+
143+ _FusionTorServiceImpl ._();
144+
134145 Tor ? _tor;
135146 String ? _torDataDirPath;
136147
You can’t perform that action at this time.
0 commit comments