Add state.HealthCheck to isActive

This commit is contained in:
Evgeniy Kulikov 2020-02-13 17:31:33 +03:00
parent b8a6af43aa
commit fbfab8cae7
No known key found for this signature in database
GPG key ID: BF6AEE0A2A699BF2
3 changed files with 25 additions and 8 deletions

View file

@ -22,8 +22,9 @@ func (r *router) receiveFile(c echo.Context) error {
cid refs.CID
oid refs.ObjectID
obj *object.Object
ctx = c.Request().Context()
con, err = r.pool.getConnection(ctx)
download = c.QueryParam("download") != ""
con, err = r.pool.getConnection()
)
if err != nil {
@ -51,7 +52,7 @@ func (r *router) receiveFile(c echo.Context) error {
)
}
ctx, cancel := context.WithTimeout(context.Background(), r.timeout)
ctx, cancel := context.WithTimeout(ctx, r.timeout)
defer cancel()
req := &object.GetRequest{Address: refs.Address{ObjectID: oid, CID: cid}}