Skip to content

Commit

Permalink
set close state before unregisterStream
Browse files Browse the repository at this point in the history
  • Loading branch information
edaniels committed Aug 14, 2024
1 parent fae4852 commit de94b90
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions association.go
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,7 @@ func (a *Association) readLoop() {
a.closeWriteLoopOnce.Do(func() { close(a.closeWriteLoopCh) })

a.lock.Lock()
a.setState(closed)
for _, s := range a.streams {
a.unregisterStream(s, closeErr)
}
Expand Down

0 comments on commit de94b90

Please sign in to comment.