Comments (6)
Thanks for the detailed issue and for providing a reproducer!
Yeah, if nothing is listening for the events we should probably close the connection. I'll take a closer look at this on Thursday.
from go-dockerclient.
Is there a plan to fix this issue as there is an official alternative now?
from go-dockerclient.
Is there a plan to fix this issue as there is an official alternative now?
Yeah I plan to get to it before the end of the Summer, just been away for a while.
from go-dockerclient.
@yyuuttaaoo @shabicheng can you try #928?
from go-dockerclient.
After testing, this patch does not work. So I think the issue should be reopened.
First, let me fix a small bug in the test program.
Now we can use the test program to test.
We can see, the fd number is still climbing. Why? There are 2 reasons:
- If there is no new event for some reason, the json.Decode will block forever.
- res.Body.Close actually hangs forever if it is called before conn.Close.
There are 2 other problems in this solution:
- There is a chance that eventChannel and errorChannel are closed before the last event was sent to the channel. This may cause panic.
- If the last event was an error, it will cause reconnect regardless of the number of listeners.
So I have made another patch based on the current one.
#930
Note:
- The patch still contains some debug printf code, because it is not fully tested.
- I have not run any UT for regression yet.
- I've only test it on Linux using unencrypted docker.sock. SSH/TLS are not tested. Windows platform is not tested.
@fsouza Would you help/coauthor to make the new patch complete?
from go-dockerclient.
@yyuuttaaoo thank you for detailed explanation! I can definitely work on that patch, but this week is a bit busy. I can come around some time next week and look into that patch and make sure it's ready for prime time!
from go-dockerclient.
Related Issues (20)
- Can auth and pull image locally, but not on dev servers HOT 1
- How to use the detach option when calling CreateContainer? HOT 1
- Add support SSH protocol for remote docker
- Please add Internal property into ContainerNetwork HOT 1
- With the Latest Docker Engine v25.x the Version Selection Magic Based on the Call Option 'ver` Tags Results in Failing Calls HOT 2
- New release HOT 3
- Looking for an example of Attach. HOT 5
- Error message may leak credentials used for mounting HOT 15
- How to get the value of NAMES field? HOT 1
- Missing some fields to support Stats API on Docker host uses cgroup2
- What would be the best way to specify version of docker api, so that go-dockerclient can adjust requests and response expectations accordingly? HOT 4
- Error trying to run ddev start after configure drupal 9 on windows HOT 3
- How to run a docker container with GPU support? HOT 1
- How to build an image with specific Tag? HOT 1
- Get error if call func updateService HOT 2
- The module name change issues HOT 5
- EndpointIPAMConfig: Unable to Unmarshal using yaml HOT 3
- About the "Remote" arg in the BuildImageOptions may cause the io error HOT 1
- Wrong error propagation in context HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-dockerclient.