Skip to content

fix(scanner): ErrNotConnected when the session ends after Forward_Open (v0.8.3) - #34

Merged
boeboe merged 2 commits into
mainfrom
fix/scanner-session-ended-after-forward-open
Nov 16, 2026
Merged

boeboe merged 2 commits into
mainfrom
fix/scanner-session-ended-after-forward-open

Conversation

@boeboe

@boeboe boeboe commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

scanner.Open took the target's address from the client's session after the Forward_Open reply. When the session had ended in between, RemoteAddr was nil, and the I/O connection was refused with ErrInvalidOption ("production without an interval or destination"). That error is about the configuration, but the cause is a lost connection. Open now reports ErrNotConnected (ERRORS.md: no registered session) and tries the Forward_Close, as on its other failures after a Forward_Open.

The chaos test of e2e met this on the Lint & Coverage job of #33 (a pin pass pull request that changes only the docsync version), with a connection killed at that moment (ETHERNETIP_CHAOS_SEED=1794795094999956670; the seed alone doesn't reproduce it, the timing matters too).

Changes

  • scanner/scanner.go: the target's address is checked before the I/O connection is opened; remoteAddr (unexported) is the seam the test uses.
  • TestOpenSessionEndedAfterForwardOpen: a session that has ended after the reply gives ErrNotConnected, not ErrInvalidOption, and one Forward_Close. It fails without the fix with the error CI saw.
  • RELEASE.md: v0.8.3 (patch; no exported identifier changes). After the merge the release workflow publishes it. ethernetipctl and ethernetip-interop's own module then move to v0.8.3.

Checks run locally

  • go test -race -count=1 ./scanner ./e2e: pass. The new test without the fix fails as expected.
  • golangci-lint run ./scanner: 0 issues. go vet ./scanner: clean.
  • bin/verify.sh: policy=compliant docs=ok build+vet=ok.

🤖 Generated with Claude Code

…n (v0.8.3)

Open took the target's address from the client's session after the
Forward_Open reply. When the session had ended in between, the address
was nil and the I/O connection was refused with ErrInvalidOption
("production without an interval or destination"), an error about the
configuration. Open now reports ErrNotConnected and tries the
Forward_Close, as on its other failures after a Forward_Open. The chaos
test of e2e met this on the pin pass pull request #33 (ci, Lint &
Coverage), as a connection killed at that moment.

TestOpenSessionEndedAfterForwardOpen ends the session at that step
through a package variable (remoteAddr) and fails without the fix with
the error CI saw.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@boeboe
boeboe merged commit 8fcaefe into main Nov 16, 2026
26 checks passed
@boeboe
boeboe deleted the fix/scanner-session-ended-after-forward-open branch November 16, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant