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

Stream does not end #494

Closed
mysilkworld opened this issue Feb 27, 2024 · 2 comments
Closed

Stream does not end #494

mysilkworld opened this issue Feb 27, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@mysilkworld
Copy link

mysilkworld commented Feb 27, 2024

Describe the bug

During file transfer, the stream never ends due to an error in the library.

Arguments are passed incorrectly to the constructor on line 299

Passed:

const stream = new MetaReadable({ id, name, size });

Expected:

class MetaReadable extends EventEmitter {
  constructor(id, name, size, options = {})

To Reproduce

({
  access: 'public',

  method: async ({ streamId }) => {
    const readable = context.client.getStream(streamId);

    const getChunks = async () => {
      console.log('start');
      const chunks = [];
      for await (const chunk of readable) {
        chunks.push(chunk);
      }
      console.log('end');
    };

    getChunks();

    return { result: 'Stream initialized' };
  },
});

Expected behavior

The stream should end.

Screenshots

No response

Desktop (please complete the following information):

  • OS: Windows 10
  • Node.js version 20.11.1

Additional context

No response

@mysilkworld mysilkworld added the bug Something isn't working label Feb 27, 2024
@tshemsedinov
Copy link
Member

Fixed: #497

@tshemsedinov
Copy link
Member

Please try to use streams

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants