Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !5651

[C++] [Qt5] fixed cpp-client-qt5 HttpRequestWorker requests crashing on timeout

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/onze/fix/cpp-qt5-client-timeout into master Mar 20, 2020
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 4

Created by: onze

… when they have actually NOT timed out (were calling back into a deleted struct).

Old behavior:

  • request without timeout on a responding url: get an answer back, works as expected.
  • request without timeout on a non-responding url: get no answer back, no callback called, works as expected.
  • request with timeout on a non-responding url: get no answer back, timeout gets triggered, works as expected.
  • request with timeout on a responding url: get answer back, reply gets deleted, timeout gets triggered, callback writes on deleted data -> crash.

Patch content: replaced the timeout integer with a QTimer to handle and own the timeout callback. The timer is stopped whenever a call gets an answer back, or the owner object is deleted.

This has only been tested empirically since the patch has a small scope.

Copying the technical committee: @ravinikam @stkrwork @etherealjoy @MartinDelille @muttleyxd

Thank you

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/onze/fix/cpp-qt5-client-timeout