*Just open the channel on creation
This commit is contained in:
parent
4712b50447
commit
64ec4bb91c
11
src/index.ts
11
src/index.ts
|
@ -464,14 +464,7 @@ async function createProtomuxChannel(aq: ActiveQuery) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
aq.setReceiveUpdate?.((data: any) => {
|
let channel = mux.createChannel({
|
||||||
switch (data.action) {
|
|
||||||
case "open":
|
|
||||||
channel.open();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
const channel = mux.createChannel({
|
|
||||||
protocol: data?.protocol,
|
protocol: data?.protocol,
|
||||||
id: data?.id,
|
id: data?.id,
|
||||||
handshake: data?.handshake,
|
handshake: data?.handshake,
|
||||||
|
@ -485,6 +478,8 @@ async function createProtomuxChannel(aq: ActiveQuery) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
channel.open();
|
||||||
|
|
||||||
const channelId = getChannelId();
|
const channelId = getChannelId();
|
||||||
|
|
||||||
connections.get(aq.callerInput.id)?.channels.set(channelId, channel);
|
connections.get(aq.callerInput.id)?.channels.set(channelId, channel);
|
||||||
|
|
Loading…
Reference in New Issue