When a printer is just connected an info/status request sometimes returns an error once. The second time it returns success with printerstate set to idle.
This seems be caused by a moment where printDriver.getPrinter() returns "3D-printer[ttyACM0]" instead of nil. But then printer:getState() returns "nil" with the message "could not open IPC socket (No such file or directory)".
On the second request the rinter:getState() returns "idle"
Summary:
Not connected:
printDriver.getPrinter() > nil
Connected:
printDriver.getPrinter() > "3D-printer[ttyACM0]"
printer:getState() > nil
error response: "could not open IPC socket (No such file or directory)"
Still connected:
printDriver.getPrinter() > "3D-printer[ttyACM0]"
printer:getState() > "idle"
It's as if print3D is running but the socket needs a bit more time to start.
In the current the client printer.state is "unkown" for a moment, which we ignore.
When a printer is just connected an info/status request sometimes returns an error once. The second time it returns success with printerstate set to idle.
This seems be caused by a moment where printDriver.getPrinter() returns "3D-printer[ttyACM0]" instead of nil. But then printer:getState() returns "nil" with the message "could not open IPC socket (No such file or directory)". On the second request the rinter:getState() returns "idle"
Summary:
It's as if print3D is running but the socket needs a bit more time to start.
In the current the client printer.state is "unkown" for a moment, which we ignore.