Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix race condition in 2.2.8 generating long pauses #337

Merged

Conversation

lasizoillo
Copy link
Contributor

Signed-off-by: lasizoillo lasizoillo@gmail.com

LXD sends TextMessage frames until the last one, then send a BinaryMessage and closes connection. If connection is closed no read events can't arrive to EPollPoller and ws4py doesn't read more data. But ws4py get into a loop in some cases waiting for streaming data to complete a message frame. There are another infinite loop waiting to ws4py to drain connection buffer.

I hope this fix resolve all corner cases. If not, I hope be more free to fix it sooner.

Signed-off-by: lasizoillo <lasizoillo@gmail.com>
@codecov-io
Copy link

codecov-io commented Nov 22, 2018

Codecov Report

Merging #337 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #337      +/-   ##
==========================================
+ Coverage   96.84%   96.84%   +<.01%     
==========================================
  Files          11       11              
  Lines         918      919       +1     
  Branches      106      106              
==========================================
+ Hits          889      890       +1     
  Misses         10       10              
  Partials       19       19
Impacted Files Coverage Δ
pylxd/models/container.py 91.1% <100%> (+0.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eed8625...2a566eb. Read the comment docs.

Copy link
Contributor

@ajkavanagh ajkavanagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM -- thanks for hunting this done.

@ajkavanagh ajkavanagh merged commit 8e57eb0 into canonical:master Nov 22, 2018
@ajkavanagh
Copy link
Contributor

Note that this may provide a fix for #336

@Silentphantom62 Silentphantom62 mentioned this pull request Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants