fix ws closing
This commit is contained in:
parent
784d4a6006
commit
6f0dec9e93
|
@ -121,6 +121,10 @@ func (b *WebSocket) Connect(args []string) error {
|
||||||
eg.Go(b.Ping)
|
eg.Go(b.Ping)
|
||||||
eg.Go(b.handleIncomingMessages)
|
eg.Go(b.handleIncomingMessages)
|
||||||
|
|
||||||
|
if err := b.sendSubscription(args); err != nil {
|
||||||
|
return fmt.Errorf("failed to send subscription: %w", err)
|
||||||
|
}
|
||||||
|
|
||||||
if err := eg.Wait(); err != nil {
|
if err := eg.Wait(); err != nil {
|
||||||
b.Disconnect()
|
b.Disconnect()
|
||||||
return fmt.Errorf("failed to handle message: %w", err)
|
return fmt.Errorf("failed to handle message: %w", err)
|
||||||
|
|
Loading…
Reference in New Issue