Skip to content

Program crashes on first peer connection failure due to indentation error #5

@s0urledd

Description

@s0urledd

Location: src/node0/utils/monitor.py line 333
Problem:

if load_state_peer_fail:
    self.load_state_fail_cnt += 1
    if self.load_state_fail_cnt >= self.terminate_load_state_limit:
        logger.error("Failed to load state from peers. Exiting run.")
    os.killpg(os.getpgrp(), signal.SIGTERM)  # ← Wrong indentation, should be inside if block
Error:
[ERROR] [node.utils.monitor.run:333] Failed to load state from peers. Exiting run.

Root Cause:
The os.killpg() command is outside the limit check, causing immediate program termination on every peer connection failure. The server's retry mechanism cannot function because the monitor kills the process before any retry attempts can be made.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions