Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"UnAttach" Stream after attach #727

Open
haeferer opened this issue Apr 18, 2023 · 1 comment
Open

"UnAttach" Stream after attach #727

haeferer opened this issue Apr 18, 2023 · 1 comment
Labels

Comments

@haeferer
Copy link

Hi,

first thanx for this nice peace of software.

Right now i have a strange problem.

I attach to a container to consume "StdIn" and "StdOut".

ct.attach({stream: true, stdout: true, stderr: true}, async (err, streams) => {
      if (err) return res.status(500).send('Error on Attach');
      uStream.ended = false;
      ct.modem.demuxStream(streams, uStream.cs.out, uStream.cs.err);
      setTimeout(() => {
          uStream.ended = true;
          (streams as any).destroy();
          console.log('Log Stream Ended')
      }, 10000);

Everything works fine with the Stream object.

In the code i want to close the stream (aka "deAttach") but the object doest not have a function "end" (according to the type, end should be available) ???

"destroy" as a function seems to work (i have to "workarround" typescript, cause destory is not typed)

So my question is: Is there a correct way to "deattach" a stream ?

Copy link

stale bot commented Nov 4, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Open a new issue if needed.

@stale stale bot added the stale label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant