File tree 1 file changed +8
-11
lines changed 1 file changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -47,17 +47,6 @@ func (c *Client) connect(obs Observer) (s *stream, err error) {
47
47
return nil , errors .Trace (err )
48
48
}
49
49
50
- if len (c .ops .Subscriptions ) != 0 {
51
- subscribe := NewSubscribe ()
52
- subscribe .ID = subscribeId
53
- subscribe .Subscriptions = c .ops .Subscriptions
54
- err = conn .Send (subscribe , false )
55
- if err != nil {
56
- conn .Close ()
57
- return nil , errors .Trace (err )
58
- }
59
- }
60
-
61
50
s = & stream {
62
51
cli : c ,
63
52
observer : obs ,
@@ -76,6 +65,14 @@ func (c *Client) connect(obs Observer) (s *stream, err error) {
76
65
return nil , errors .Trace (err )
77
66
}
78
67
if len (c .ops .Subscriptions ) != 0 {
68
+ subscribe := NewSubscribe ()
69
+ subscribe .ID = subscribeId
70
+ subscribe .Subscriptions = c .ops .Subscriptions
71
+ err = conn .Send (subscribe , false )
72
+ if err != nil {
73
+ conn .Close ()
74
+ return nil , errors .Trace (err )
75
+ }
79
76
err = s .subscribeFuture .Wait (c .ops .Timeout )
80
77
if err != nil {
81
78
s .die ("subscribe timeout" , err )
You can’t perform that action at this time.
0 commit comments