4

I'm working with an OPOS device and I've noticed that if something fails before my code gets the chance to release/close the device, that ClaimDevice fails from there forward (usually error 101). Even if I shut down the app. or physically power off the device, the call to ClaimDevice still fails. I physically have to reboot the machine to get it to start working on.

While I can code to make sure I always release/close it, this really scares me since in a production environment since I have no way of gracefully recovering from this.

Even worse, I've seen cases where after this failure and after shutting down the app. and restarting the API calls don't return errors, but definitely don't work anymore.

Is there any better way of handling this?

Paul Mrozowski
  • 6,604
  • 9
  • 34
  • 47
  • I wonder if that is device specific. I implemented an OPOS solution many years ago and I never had the issues. Which devices are you using that are having this issue? – logixologist Jul 04 '13 at 16:54
  • Also, what language are you coding it in? – logixologist Jul 04 '13 at 16:55
  • The Ingenico iSC250. I can repro. this from their test application that they include (not sure what language it's in - for some reason they don't include source code which makes it a lot less useful). I did a bit of testing and I can minimize this by putting the cleanup code in the destructor; this can still fail but should minimize the # of scenarios where things go bad. – Paul Mrozowski Jul 05 '13 at 14:08
  • Any progress on this. I'm experiencing same thing with a EPSON POS printer. – mortenbock Dec 06 '13 at 10:28
  • 1
    Sort of. I realized that I wasn't always unbinding my events which really caused this to occur fairly often. So now when I clean up I make sure I'm closing the connection and disconnecting the events. That seems to have helped quite a bit. – Paul Mrozowski Dec 07 '13 at 19:43

0 Answers0