tgcallsjs / tgcalls

A JavaScript library for interacting with the Telegram group voice calls API.
https://tgcallsjs.github.io/tgcalls/
GNU Lesser General Public License v3.0
48 stars 12 forks source link

TGCalls connection issue #3

Closed rojvv closed 3 years ago

rojvv commented 3 years ago

The actual issue

An error is thrown with the message Connection already started when TGCalls.start is called while the TGCalls class got an error when calling joinVoiceCall and didn't get the transport.

Reproducing

const tgcalls = new TGCalls();
tgcalls.joinVoiceCall = (p) => { throw new Error(); };
(async() => { await tgcalls.start(); await tgcalls.start(); })()
rojvv commented 3 years ago

Thank you very ton!