Conversation
Some servers close the connection forcefully when asking for a queue status
There was a problem hiding this comment.
Pull request overview
This PR adds support for handling forceful connection closures during LPR status checks and updates project dependencies. The main enhancement allows callers to optionally ignore abrupt server disconnections (connection reset errors), which can occur with some LPR implementations.
- Added
ignoreForcefulCloseparameter toGetStatusfunction to handle servers that forcefully close connections - Updated Go version to 1.25 and golang.org/x/text to v0.31.0
- Enhanced documentation with RFC link and improved function documentation
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| lpr_status.go | Added ignoreForcefulClose parameter and logic to detect/ignore connection reset errors |
| lpr_status_test.go | Updated existing test calls with new parameter and added test for connection reset scenario |
| go.mod | Updated Go version to 1.25 and golang.org/x/text dependency to v0.31.0 |
| README.md | Added RFC 1179 link for LPR protocol reference |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@gerhardgruber I've opened a new pull request, #22, to work on those changes. Once the pull request is ready, I'll request review from you. |
…on resets Co-authored-by: gerhardgruber <1944892+gerhardgruber@users.noreply.github.com>
Co-authored-by: gerhardgruber <1944892+gerhardgruber@users.noreply.github.com>
|
@copilot please re-review |
|
@gerhardgruber I've opened a new pull request, #23, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
lpr_daemon.go
Outdated
| traceFile.WriteString("-----\n") | ||
| traceFile.Write(command) |
There was a problem hiding this comment.
Lines 392-393 write to traceFile without checking for errors, while earlier writes in the function do check. For consistency and to ensure trace file writes don't silently fail, these calls should also check and log errors like the writes at lines 371, 381, and 387.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 10 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.