mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Remove publisher if no one is listening
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
76141a0077
commit
217a2bd1b6
3 changed files with 13 additions and 2 deletions
|
@ -274,10 +274,10 @@ func TestGetContainerStats(t *testing.T) {
|
|||
t.Fatalf("GET containers/stats sockRequest failed: %v", err)
|
||||
}
|
||||
|
||||
dec := json.NewDecoder(bytes.NewBuffer(body))
|
||||
var s *stats.Stats
|
||||
if err := json.Unmarshal(body, &s); err != nil {
|
||||
if err := dec.Decode(&s); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
logDone("container REST API - check GET containers/stats")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue