coreapi pubsub: fix review nits
License: MIT Signed-off-by: Łukasz Magiera <magik6k@gmail.com>
Łukasz Magiera committed
Sep 26, 2018 at 18:24 UTC
18d5999ebc8fadabf53be0794da3f945a4b8e1dc
2 files changed
+3
-1
core/commands/pubsub.go
+3
@@ -88,6 +88,9 @@ This command outputs data in the following encodings:
88
discover, _ := req.Options[pubsubDiscoverOptionName].(bool)
89
90
sub, err := api.PubSub().Subscribe(req.Context, topic, options.PubSub.Discover(discover))
91
+ if err != nil {
92
+ return err
93
+ }
94
defer sub.Close()
95
96
if f, ok := res.(http.Flusher); ok {
core/coreapi/interface/pubsub.go
-1
@@ -38,7 +38,6 @@ type PubSubAPI interface {
38
Ls(context.Context) ([]string, error)
39
40
// Peers list peers we are currently pubsubbing with
41
- // TODO: WithTopic
41
Peers(context.Context, ...options.PubSubPeersOption) ([]peer.ID, error)
42
43
// Publish a message to a given pubsub topic