File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -110,10 +110,11 @@ class RegistryService {
110110 }
111111
112112 final streams = < Multihash , StreamController <SignedRegistryEntry >> {};
113+ final subs = < Multihash > {};
113114
114115 Future <SignedRegistryEntry ?> get (Uint8List pk) async {
115116 final key = Multihash (pk);
116- if (streams. containsKey (key)) {
117+ if (subs. contains (key)) {
117118 node.logger.verbose ('[registry] get (subbed) $key ' );
118119 final res = getFromDB (pk);
119120 if (res != null ) {
@@ -124,6 +125,7 @@ class RegistryService {
124125 return getFromDB (pk);
125126 } else {
126127 sendRegistryRequest (pk);
128+ subs.add (key);
127129 streams[key] = StreamController <SignedRegistryEntry >.broadcast ();
128130 if (getFromDB (pk) == null ) {
129131 node.logger.verbose ('[registry] get (clean) $key ' );
You can’t perform that action at this time.
0 commit comments