*Just open the channel on creation

This commit is contained in:
Derrick Hammer 2023-04-08 14:47:12 -04:00
parent 4712b50447
commit 64ec4bb91c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 8 deletions

View File

@ -464,14 +464,7 @@ async function createProtomuxChannel(aq: ActiveQuery) {
};
};
aq.setReceiveUpdate?.((data: any) => {
switch (data.action) {
case "open":
channel.open();
}
});
const channel = mux.createChannel({
let channel = mux.createChannel({
protocol: data?.protocol,
id: data?.id,
handshake: data?.handshake,
@ -485,6 +478,8 @@ async function createProtomuxChannel(aq: ActiveQuery) {
return;
}
channel.open();
const channelId = getChannelId();
connections.get(aq.callerInput.id)?.channels.set(channelId, channel);