Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Ping does not work correctly #412

Description

@PrimozGodec

Issue

Ping function from Hyper does not check the real state of the connection. In my case, I make a connection to the server and then I switch off the internet connection. When I ping after switching off the internet connection ping is still successful. I went through the Hyper implementation and found out that ping function does not check whether the response (pong) comes back from the server. It just sends a request. Am I correct?

An example:

from hyper import HTTP20Connection
conn = HTTP20Connection('api.garaza.io:443',force_proto='h2')
# here I swithc off internet connection
conn.ping(bytes(8))

Am I doing anything wrong? Should I check the response separately?

Activity

  1. PrimozGodec commented on May 27, 2019

    @PrimozGodec
    ContributorAuthor

    @Lukasa can you give me just a hint on how to correct the issue or how to correctly use the ping function.

  2. PrimozGodec commented on Aug 1, 2019

    @PrimozGodec
    ContributorAuthor

    @njsmith, @sethmlarson, and @tomchristie I would be extremely happy if you give me a hint on how to solve the issue. It is a functionality that needs to work but I do not know how to start solving the issue since I do not understand the library exactly. I would be also happy if someone confirms that it is an issue.

  3. lovelydinosaur commented on Aug 1, 2019

    @lovelydinosaur

    Sorry, can't help here - I've not dug into it myself. (We likely won't want httpx to send outgoing ping messages, or expose that level of functionality in a public interface.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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