star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
91 stars 55 forks source link

Port open failure may occur on LAN I/F with continuous open/close #128

Open bandit-ibayashi opened 2 weeks ago

bandit-ibayashi commented 2 weeks ago

Phenomenon

When repeatedly printing with an execution of StarPrinter.open() and StarPrinter.close() methods via LAN interface, StarIO10Error.inUse error may be occurred in StarPrinter.open() method.

Conditions for Occurrence

Cause

It has been identified that after calling the iOS API by Apple Inc. to close the communication port of the printer, there can be a delay before the iOS device sends the communication for the closing process. During this interval, until the printer receives the port closing process from the iOS device, the next port opening will fail.

Workaround

If the StarIO10Error.inUse error is thrown, please add an wait for approximately 500 milliseconds (*) before re-executing the StarPrinter.open() method.