Rev966, Display user quota in sidebar, Fix non-root content.json publishing in sidebar, Publish to same ammount of passive peers as limit, Fix site address case bug
This commit is contained in:
parent
e891a10e54
commit
48db062b49
8 changed files with 25 additions and 8 deletions
|
@ -8,7 +8,7 @@ class Config(object):
|
|||
|
||||
def __init__(self, argv):
|
||||
self.version = "0.3.6"
|
||||
self.rev = 957
|
||||
self.rev = 966
|
||||
self.argv = argv
|
||||
self.action = None
|
||||
self.config_file = "zeronet.conf"
|
||||
|
|
|
@ -404,8 +404,8 @@ class Site(object):
|
|||
inner_path, len(published), len(passive_peers)
|
||||
))
|
||||
|
||||
for peer in passive_peers[0:3]:
|
||||
gevent.spawn(self.publisher, inner_path, passive_peers, published, limit=limit+3)
|
||||
for peer in passive_peers[0:limit]:
|
||||
gevent.spawn(self.publisher, inner_path, passive_peers, published, limit=limit*2)
|
||||
|
||||
# Send my hashfield to every connected peer if changed
|
||||
gevent.spawn(self.sendMyHashfield, 100)
|
||||
|
|
|
@ -54,6 +54,11 @@ class SiteManager(object):
|
|||
from Site import Site
|
||||
site = self.get(address)
|
||||
if not site: # Site not exist yet
|
||||
# Try to find site with differect case
|
||||
for recover_address, recover_site in self.sites.items():
|
||||
if recover_address.lower() == address.lower():
|
||||
return recover_site
|
||||
|
||||
if not self.isAddress(address):
|
||||
return False # Not address: %s % address
|
||||
logging.debug("Added new site: %s" % address)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue