open-feature/go-sdk-contrib

Panic on new Go-Feature-Flag provider

Closed this issue · 2 comments

GoFeatureFlag provider panics after upgrading from v0.1.33 to v0.2.0.

I don't have a small snippet I can share yet but will try to attach one asap.

This is related to #547

 panic: runtime error: invalid memory address or nil pointer dereference
 [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1bcf4d2]
 goroutine 82 [running]:
 github.com/open-feature/go-sdk-contrib/providers/go-feature-flag/pkg.(*Provider).startPolling.func1()
         /home/vagrant/go/pkg/mod/github.com/open-feature/go-sdk-contrib/providers/go-feature-flag@v0.2.0/pkg/provider.go:248 +0x112
 created by github.com/open-feature/go-sdk-contrib/providers/go-feature-flag/pkg.(*Provider).startPolling in goroutine 69
         /home/vagrant/go/pkg/mod/github.com/open-feature/go-sdk-contrib/providers/go-feature-flag@v0.2.0/pkg/provider.go:226 +0xd6

the only possible way it can fail on line 248 is when err is nil

image