Skip to content

Commit 9a0a67f

Browse files
committed
missed some error checking, and added a workaround to weird docker event listening bug
1 parent 16b4e61 commit 9a0a67f

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

attacher.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ func NewAttachManager(client *docker.Client) *AttachManager {
3030
}
3131
go func() {
3232
events := make(chan *docker.APIEvents)
33+
// TODO: resolve this workaround. https://github.com/fsouza/go-dockerclient/issues/101
34+
assert(client.AddEventListener(events), "attacher")
35+
assert(client.RemoveEventListener(events), "attacher")
3336
assert(client.AddEventListener(events), "attacher")
3437
for msg := range events {
3538
debug("event:", msg.ID[:12], msg.Status)

logspout.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ func syslogStreamer(target Target, types []string, logstream chan *Log) {
6161
continue
6262
}
6363
tag := logline.Name + target.AppendTag
64-
remote, _ := syslog.Dial("udp", target.Addr, syslog.LOG_USER|syslog.LOG_INFO, tag)
64+
remote, err := syslog.Dial("udp", target.Addr, syslog.LOG_USER|syslog.LOG_INFO, tag)
65+
assert(err, "syslog")
6566
io.WriteString(remote, logline.Data)
6667
}
6768
}

0 commit comments

Comments
 (0)