Skip to content

Commit b20d2c8

Browse files
author
Matthew Fisher
committed
fix(publisher): skip when failed to retrieve container
There is a race condition where a container starts via `docker run`, but then immediately fails because an incorrect command was specified or some other error occurred that caused the container to fail over. In this case, we should just log and fail over, rather than killing publisher.
1 parent 3731d40 commit b20d2c8

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

publisher/publisher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ func listenContainers(client *docker.Client, etcdClient *etcd.Client, ttl time.D
6060
if event.Status == "start" {
6161
container, err := getContainer(client, event.ID)
6262
if err != nil {
63-
log.Fatal(err)
63+
log.Println(err)
64+
continue
6465
}
6566
publishContainer(etcdClient, container, ttl)
6667
}

0 commit comments

Comments
 (0)