Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A AndroidAsync
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 333
    • Issues 333
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 19
    • Merge requests 19
  • 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
  • Koushik Dutta
  • AndroidAsync
  • Merge requests
  • !684

Fix client timeout caused by AsyncNetworkSocket write()

  • Review changes

  • Download
  • Email patches
  • Plain diff
Open jhihn requested to merge github/fork/jhihn/patch-1 into master Oct 02, 2020
  • Overview 2
  • Commits 1
  • Pipelines 1
  • Changes 1

There is a problem when a large (>345 kB) message is being written to a websocket. The connection will actually time out, unless this while is in place. Unfortunately, this pretty much busy-waits. But whatever the queueing mechanism is, is broken at least for websockets and large messages. My messages are ~2MB.

.154 AndroidAsync: before:1926139
.154 AndroidAsync: remaining:1577171
.156 AndroidAsync: before:1926139
.156 AndroidAsync: remaining:1577171
.158 AndroidAsync: before:1926139
...
.240 AndroidAsync: remaining:0

Without this, your connection will be dropped by the remote side. Tested with C++ qtwebsockets and Python websockets clients.

The two part write()/handleRemaining() does not seem to handlw when handleRemaining() still has remaining properly.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/jhihn/patch-1