As described in the issue, there was a panic that occured when using attach_stream on an actor that stops. This PR fixes this by using the SendMessage trait.
Additionally, the spawned tokio task stops when the stream returns None, and returns the stream.
Fixes https://github.com/tqwewe/kameo/issues/45
As described in the issue, there was a panic that occured when using
attach_stream
on an actor that stops. This PR fixes this by using theSendMessage
trait.Additionally, the spawned tokio task stops when the stream returns
None
, and returns the stream.