Avoid a stacktrace by verifying that the share is known

bug/bundler_fix
HD Moore 2017-05-26 17:01:44 -05:00
parent 8caaba01f1
commit e8b5cc3397
1 changed files with 6 additions and 2 deletions

View File

@ -139,8 +139,12 @@ attr_accessor :socket, :client, :direct, :shares, :last_share
end
def disconnect(share)
if self.shares[share]
ok = self.client.tree_disconnect(self.shares[share])
self.shares.delete(share)
return ok
end
false
end