GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Body callback function is not called when some errors occur (timeout etc.) · Issue #640 · cpp-netlib/cpp-netlib

Body callback function is not called when some errors occur (timeout etc.) #640

New issue
Copy link
New issue
Copy link
Closed
Closed
Body callback function is not called when some errors occur (timeout etc.)#640
Copy link

Description

@Grzegorz-Baran
Grzegorz-Baran
opened on Apr 20, 2016
Issue body actions

When using cpp-netlib-0.11.2-final and async client with body callback function:

boost::network::http::client::options options;
options.timeout( timeout_seconds );
options.follow_redirects( true );

boost::network::http::client client( options );
client.get( request, callback );

The callback is not called when some network etc. errors occur. I observed it that when timeout should occur my callback function is still not called, but when I looked at cpp-netlib's async_normal.hpp file I found not only for timeout, but in many places in which body_promise IS set (either to empty value or exception), but callback either IS NOT called at all, or is called with uninitialized boost::system::error_code instead of the same error code body_promise was set, which would make my own callback function expect another call instead of finish the processing (since uninitialized error_code means no error occurred and we are still waiting for boost::asio::error::eof or other error to finish the processing).

The issue is also present on the current master branch. I created a pull request with proposed fix for this.

Activity

  1. Grzegorz-Baran
    added a commit that references this issue on Apr 20, 2016

    Fix for: Body callback function is not called when some errors occur …

    a1e16f3
  2. deanberris
    added a commit that references this issue on Apr 20, 2016

    Merge pull request #641 from gb-krk/body_callback_fix

    d23bfb2
  3. Grzegorz-Baran
    added a commit that references this issue on Apr 21, 2016

    Fix for: Body callback function is not called when some errors occur …

    66fa71c
  4. deanberris
    closed this as completedon Apr 21, 2016
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

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.