good morning!!!!

Skip to content
Snippets Groups Projects
Verified Commit 37b77dbc authored by a's avatar a
Browse files

ok

parent 7e422bdd
No related branches found
No related tags found
2 merge requests!15Draft: V2,!13Draft: Move Openrpc Package
......@@ -99,6 +99,10 @@ func (n *Notifier) Notify(data any) error {
return n.send(enc)
}
func (n *Notifier) Err() <-chan error {
return n.err
}
func (n *Notifier) send(data json.RawMessage) error {
params, _ := json.Marshal(&subscriptionResult{ID: string(n.id), Result: data})
return n.h.Notify(n.namespace+notificationMethodSuffix, json.RawMessage(params))
......
......@@ -41,6 +41,7 @@ func main() {
for {
select {
case <-r.Context().Done():
case <-notifier.Err():
default:
}
notifier.Notify(idx)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment