Fix NPE in dialer#2022
Conversation
Signed-off-by: Li Yi <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #2022 +/- ##
==========================================
+ Coverage 40.48% 45.51% +5.02%
==========================================
Files 73 94 +21
Lines 7998 9349 +1351
==========================================
+ Hits 3238 4255 +1017
- Misses 4245 4384 +139
- Partials 515 710 +195
Continue to review full report at Codecov.
|
| go func() { | ||
| dr := <-synC | ||
| if dr != nil { | ||
| if dr != nil && dr.c != nil { |
There was a problem hiding this comment.
seems reasonable; given this means that dialer() returns an error I wonder if there is any reason to log this error, which is effectively coming from net.DialTimeout()? But given a timeout error is already being returned and this is in a goroutine it could be messy to try and log.
There was a problem hiding this comment.
Given we reached the timeout, I don't think it's useful to log any error the dialer might return.
|
LGTM |
Signed-off-by: Li Yi [email protected]
In one testing with Docker Engine 17.12, I found the NPE in dialer of containerd. The log of docker engine is as following: