fix log spamming
This commit is contained in:
parent
c95d4b2685
commit
954f5d793d
@ -83,7 +83,7 @@ def stream_from_peers():
|
|||||||
|
|
||||||
while stream_times >= stream_counter:
|
while stream_times >= stream_counter:
|
||||||
stream_counter += 1
|
stream_counter += 1
|
||||||
logger.debug("Reading block of id in stream with " + peer.transport_address, terminal=True)
|
#logger.debug("Reading block of id in stream with " + peer.transport_address, terminal=True)
|
||||||
sock.settimeout(5)
|
sock.settimeout(5)
|
||||||
block_id = sock.recv(BLOCK_ID_SIZE)
|
block_id = sock.recv(BLOCK_ID_SIZE)
|
||||||
if blockdb.has_block(block_id):
|
if blockdb.has_block(block_id):
|
||||||
|
@ -35,13 +35,13 @@ async def accept_stem_blocks(
|
|||||||
|
|
||||||
for _ in range(MAX_STEM_BLOCKS_PER_STREAM):
|
for _ in range(MAX_STEM_BLOCKS_PER_STREAM):
|
||||||
read_routine = reader.readexactly(BLOCK_ID_SIZE)
|
read_routine = reader.readexactly(BLOCK_ID_SIZE)
|
||||||
logger.debug(f"Reading block id in stem server", terminal=True)
|
#logger.debug(f"Reading block id in stem server", terminal=True)
|
||||||
block_id = await wait_for(read_routine, base_wait_timeout)
|
block_id = await wait_for(read_routine, base_wait_timeout)
|
||||||
block_id = block_id.decode('utf-8')
|
block_id = block_id.decode('utf-8')
|
||||||
if not block_id:
|
if not block_id:
|
||||||
break
|
break
|
||||||
|
|
||||||
logger.debug(f"Reading block size in stem server", terminal=True)
|
#logger.debug(f"Reading block size in stem server", terminal=True)
|
||||||
block_size = (await wait_for(
|
block_size = (await wait_for(
|
||||||
reader.readexactly(BLOCK_SIZE_LEN),
|
reader.readexactly(BLOCK_SIZE_LEN),
|
||||||
base_wait_timeout)).decode('utf-8')
|
base_wait_timeout)).decode('utf-8')
|
||||||
@ -54,7 +54,7 @@ async def accept_stem_blocks(
|
|||||||
if block_size > BLOCK_MAX_SIZE:
|
if block_size > BLOCK_MAX_SIZE:
|
||||||
raise ValueError("Max block size")
|
raise ValueError("Max block size")
|
||||||
|
|
||||||
logger.debug(f"Reading block of size {block_size} in stem server", terminal=True)
|
#logger.debug(f"Reading block of size {block_size} in stem server", terminal=True)
|
||||||
|
|
||||||
raw_block: bytes = await wait_for(
|
raw_block: bytes = await wait_for(
|
||||||
reader.readexactly(block_size), base_wait_timeout * 6)
|
reader.readexactly(block_size), base_wait_timeout * 6)
|
||||||
|
Loading…
Reference in New Issue
Block a user