Skip to content

Commit 1de847d

Browse files
committed
client.Connect should not block
1 parent 98b720e commit 1de847d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/gchatmeow/client.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ func (c *Client) Connect(ctx context.Context, maxAge time.Duration) error {
113113
})
114114
c.channel.OnReceiveArray.AddObserver(c.onReceiveArray)
115115

116-
return c.channel.Listen(ctx, maxAge)
116+
go c.channel.Listen(ctx, maxAge)
117+
return nil
117118
}
118119

119120
func (c *Client) RefreshTokens(ctx context.Context) error {

0 commit comments

Comments
 (0)