Skip to content

get_free_port broken #802

@brunoerg

Description

@brunoerg

When running the test_coldcard, I noticed that every run I was getting the following errors:

Error: Unable to bind to 127.0.0.1:53174 on this computer. Bitcoin Core is probably already running.
Error: Failed to listen on any port. Use -listen=0 if you want this.

Probably related to the get_free_port function since setting up the p2p_port and rpc_port manually worked:

def get_free_port():
        s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
        s.bind(("", 0))
        s.listen(1)
        port = s.getsockname()[1]
        s.close()
        return por

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