1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2025-05-31 02:29:18 +02:00

Fix Poll(); yeyy tests

This commit is contained in:
Philipp Heckel 2021-12-22 23:45:19 +01:00
parent fe5734d9f0
commit 85939618c8
6 changed files with 63 additions and 4 deletions
client

View file

@ -116,6 +116,7 @@ func (c *Client) Poll(topic string, options ...SubscribeOption) ([]*Message, err
msgChan := make(chan *Message)
errChan := make(chan error)
topicURL := c.expandTopicURL(topic)
options = append(options, WithPoll())
go func() {
err := performSubscribeRequest(ctx, msgChan, topicURL, "", options...)
close(msgChan)