lsongdev / lsongdev/node-escpos

SerialPort when flush or close, it will wait too long to close the serialPort

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.6k
Forks
443
PR merge metrics
No merged PRs in 30d

Description

Code like:
` printer
.hardware("init")
.text('敏捷的棕色狐狸跳过懒狗')
.flush(function(){
// nothing
})
.close();
`
or
`printer
.hardware("init")
.text('敏捷的棕色狐狸跳过懒狗')
.close(function(){
// nothing
});
`
The frist print is OK, but after twice or more, the serialPort will close very very slow.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the SerialPort handling for flush and close, then reproduce the issue with the repeated printer sequence shown in the report. Check how repeated flush or close calls affect shutdown timing; done means the serial port closes promptly after multiple print cycles.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, typescript
Domain
embedded-iot
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.