Skip to content

Gathering certificates can get stuck if the server doesn't respond #567

@danthe1st

Description

@danthe1st

Someone on Stack Overflow experienced an issue where installing updates got stuck waiting for the certificates (which was introduced with #235).

httpResponse.get() might wait forever if the request takes forever which is possible because no timeout is set and HttpClient blocks forever by default. I didn't find any other uses of HttpRequest.newBuilder() in p2.

I suggest adding a timeout to this and I am willing to contribute that (unless someone else really wants to do that).

Are there any opinions on a good timeout? I would suggest something along the line of 2-5 seconds since the HTTP request taking more time would indicate some sort of issue in which case not accepting the certificate is probably fine.

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