koding / kite

Micro-service framework in Go
https://godoc.org/github.com/koding/kite
MIT License
3.26k stars 300 forks source link

tokenrenewer: improve fix for a panic #187 #191

Closed rjeczalik closed 7 years ago

rjeczalik commented 7 years ago

A number of changes:

Makes (Kite).callOn method impelementations on a par with *Client ones.

The recover method should be called from within a function, not be a deferred function itself.

The error returned by kontrol is different than the ErrKitNotAvailable, that's why the assert on message content.

Moreover the renewLoop lifetime handling was improved: