googlearchive / cloud-functions-go

Unofficial Native Go Runtime for Google Cloud Functions
Apache License 2.0
423 stars 44 forks source link

Fix supervisor request error handling #25

Closed ssttevee closed 6 years ago

ssttevee commented 6 years ago

Resolves #24

The problem is that ctx.Err() is actually nil before ctx.Done() is closed. So, it was checking for err == nil and then returning a timeout error, in turn killing the instance.

https://golang.org/pkg/context/#Context