use separate backend hooks with tighter pledge
This commit is contained in:
parent
c77ef4636c
commit
5435dd1b3f
|
@ -73,6 +73,8 @@ func shrinkit(data []byte) (*image.Image, error) {
|
||||||
return res.Image, nil
|
return res.Image, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var backendhooks []func()
|
||||||
|
|
||||||
func backendServer() {
|
func backendServer() {
|
||||||
log.Printf("backend server running")
|
log.Printf("backend server running")
|
||||||
shrinker := new(Shrinker)
|
shrinker := new(Shrinker)
|
||||||
|
@ -92,7 +94,7 @@ func backendServer() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panicf("unable to register shrinker: %s", err)
|
log.Panicf("unable to register shrinker: %s", err)
|
||||||
}
|
}
|
||||||
for _, h := range preservehooks {
|
for _, h := range backendhooks {
|
||||||
h()
|
h()
|
||||||
}
|
}
|
||||||
srv.Accept(lis)
|
srv.Accept(lis)
|
||||||
|
|
Loading…
Reference in New Issue