Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
| ... | ... |
@@ -15,6 +15,7 @@ import ( |
| 15 | 15 |
"github.com/moby/buildkit/solver/pb" |
| 16 | 16 |
"github.com/moby/buildkit/util/network" |
| 17 | 17 |
specs "github.com/opencontainers/runtime-spec/specs-go" |
| 18 |
+ "github.com/sirupsen/logrus" |
|
| 18 | 19 |
) |
| 19 | 20 |
|
| 20 | 21 |
const networkName = "bridge" |
| ... | ... |
@@ -100,10 +101,10 @@ func (iface *lnInterface) Set(s *specs.Spec) {
|
| 100 | 100 |
|
| 101 | 101 |
func (iface *lnInterface) Close() error {
|
| 102 | 102 |
<-iface.ready |
| 103 |
- err := iface.sbx.Delete() |
|
| 104 |
- if iface.err != nil {
|
|
| 105 |
- // iface.err takes precedence over cleanup errors |
|
| 106 |
- return iface.err |
|
| 107 |
- } |
|
| 108 |
- return err |
|
| 103 |
+ go func() {
|
|
| 104 |
+ if err := iface.sbx.Delete(); err != nil {
|
|
| 105 |
+ logrus.Errorf("failed to delete builder network sandbox: %v", err)
|
|
| 106 |
+ } |
|
| 107 |
+ }() |
|
| 108 |
+ return iface.err |
|
| 109 | 109 |
} |