Skip to content

await server.ready hangs if started with exec_mode="task" and unable to start on the given port #841

@clintonstimpson

Description

@clintonstimpson

Using this code:

        task = self.server.start(host=host, port=port, exec_mode="task", thread=True)
        await self.server.ready

I'm getting this error printed to the console:

future: <Task finished name='Task-18' coro=<WebAppServer.start() done, defined at ...wslink\backends\aiohttp_init_.py:139> exception=PermissionError(13, "error while attempting to bind on address ('0.0.0.0', 9000): [winerror 10013] an attempt was made to access a socket in a way forbidden by its access permissions")>

and there is a hang on await server.ready

It appears in trame_server/core.py, there is an on_done() method added to the task and within that a try/except block which catches the exception with no propagation of the exception.

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