mirror of
https://github.com/markqvist/Reticulum
synced 2026-11-27 23:00:28 +00:00
Added check for already transferring resource to Link class
This commit is contained in:
1 parent
4870e741f6
commit
85f60ea04e
1 file changed
+7
@@ -900,6 +900,13 @@ class Link:
|
||||
def register_incoming_resource(self, resource):
|
||||
self.incoming_resources.append(resource)
|
||||
|
||||
def has_incoming_resource(self, resource):
|
||||
for incoming_resource in self.incoming_resources:
|
||||
if incoming_resource.hash == resource.hash:
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def cancel_outgoing_resource(self, resource):
|
||||
if resource in self.outgoing_resources:
|
||||
self.outgoing_resources.remove(resource)
|
||||
|
||||
Reference in new issue
Block a user