Expose dataChannel for e2e testing. (#161)
This commit is contained in:
@@ -43,6 +43,10 @@ class Engine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
@internal
|
||||
Transport? get primary => _subscriberPrimary ? subscriber : publisher;
|
||||
|
||||
rtc.RTCDataChannel? get dataChannel => _subscriberPrimary
|
||||
? _reliableDCSub ?? _lossyDCSub
|
||||
: _reliableDCPub ?? _lossyDCPub;
|
||||
|
||||
// data channels for packets
|
||||
rtc.RTCDataChannel? _reliableDCPub;
|
||||
rtc.RTCDataChannel? _lossyDCPub;
|
||||
@@ -110,6 +114,11 @@ class Engine extends Disposable with EventsEmittable<EngineEvent> {
|
||||
this.roomOptions = roomOptions ?? this.roomOptions;
|
||||
this.fastConnectOptions = fastConnectOptions;
|
||||
|
||||
if (connectionState == ConnectionState.connected) {
|
||||
logger.fine('already connected');
|
||||
return;
|
||||
}
|
||||
|
||||
_updateConnectionState(ConnectionState.connecting);
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user