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

Multiple Printers using the same server #23

Open
fantapop opened this issue Jun 22, 2018 · 0 comments
Open

Multiple Printers using the same server #23

fantapop opened this issue Jun 22, 2018 · 0 comments

Comments

@fantapop
Copy link

I'm trying to wrap my head around how instantiating multiple printers works. It looks like the functionality is close to existing since you can pass a pre-existing server into the Printer object. The problem is that onrequest is called on the server for every printer which is instantiated

server.on('request', onrequest)
so if I instantiate two printers with a pre-existing server and then send a print job to one of them the onrequest handler gets called twice and then it blows up because it is mutating the req._body field during each call
req._body = ipp.request.decode(req._body)
. Was this not intended to allow multiple printer objects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant