This fix changes expiry/3 in such a way that the expiry time is
evaluated at runtime of the stream, rather than definition time.
This grants greater flexibility and enables setting up a configured
stream in advance (e.g. at compile time or in a gen_server init)
and passing the stream around for use in various places, at various
times.
This fix changes expiry/3 in such a way that the expiry time is evaluated at runtime of the stream, rather than definition time. This grants greater flexibility and enables setting up a configured stream in advance (e.g. at compile time or in a gen_server init) and passing the stream around for use in various places, at various times.
See the added tests for an example.
Fixes #47