*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) => {
|
||||
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);
|
||||
|
|
Loading…
Reference in New Issue