• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

grid-x / ocpp-go / 23795973618
89%
gridx_extensions: 89%

Build:
Build:
LAST BUILD BRANCH: fix/client-dispatcher-send-on-closed-channel
DEFAULT BRANCH: gridx_extensions
Ran 31 Mar 2026 11:56AM UTC
Jobs 1
Files 111
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

31 Mar 2026 11:55AM UTC coverage: 88.886% (-0.1%) from 88.999%
23795973618

push

github

mkrafeld
fix(ocppj): guard DefaultClientDispatcher.SendRequest against send-on-closed-channel panic

Stop() previously closed requestChannel, so a concurrent SendRequest call
racing the close would panic at 'd.requestChannel <- true'. This mirrors
the same bug the ServerDispatcher already had fixed via stoppedC.

Changes:
- Add stoppedC chan struct{} to DefaultClientDispatcher
- Start(): initialise stoppedC alongside requestChannel (under mutex)
- Stop(): close stoppedC instead of requestChannel; set requestChannel=nil
  so IsRunning() returns false immediately
- SendRequest(): capture rc/sc under RLock, return error if rc==nil, then
  use select{case rc<-true / case <-sc} so a concurrent Stop() returns
  "client stopped" instead of panicking
- messagePump(): add case <-d.stoppedC as primary exit path

22 of 29 new or added lines in 1 file covered. (75.86%)

4 existing lines in 1 file now uncovered.

6542 of 7360 relevant lines covered (88.89%)

13.5 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
89.97
-2.42% ocppj/dispatcher.go

Coverage Regressions

Lines Coverage ∆ File
4
89.97
-2.42% ocppj/dispatcher.go
Jobs
ID Job ID Ran Files Coverage
1 23795973618.1 31 Mar 2026 11:56AM UTC 111
88.89
GitHub Action Run
Source Files on build 23795973618
  • Tree
  • List 111
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 7ec91c7a on github
  • Prev Build on fix/client-dispatcher-send-on-closed-channel (#23795795276)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc