Skip to content

libs: Handle SIGHUP explicitly inside autofile#2480

Merged
xla merged 2 commits intodevelopfrom
2260-autofile-watchers-refactoring
Sep 25, 2018
Merged

libs: Handle SIGHUP explicitly inside autofile#2480
xla merged 2 commits intodevelopfrom
2260-autofile-watchers-refactoring

Conversation

@melekes
Copy link
Contributor

@melekes melekes commented Sep 24, 2018

Refs #2260

  • Updated all relevant documentation in docs
  • Updated all code comments where relevant
  • Wrote tests
  • Updated CHANGELOG_PENDING.md

@codecov-io
Copy link

codecov-io commented Sep 24, 2018

Codecov Report

Merging #2480 into develop will decrease coverage by 0.06%.
The diff coverage is 95.83%.

@@             Coverage Diff             @@
##           develop    #2480      +/-   ##
===========================================
- Coverage     61.7%   61.63%   -0.07%     
===========================================
  Files          198      197       -1     
  Lines        16358    16332      -26     
===========================================
- Hits         10093    10066      -27     
  Misses        5438     5438              
- Partials       827      828       +1
Impacted Files Coverage Δ
libs/autofile/autofile.go 76.31% <95.83%> (+1.66%) ⬆️
consensus/reactor.go 73.02% <0%> (-0.4%) ⬇️


closeTicker *time.Ticker
closeTickerStopCh chan struct{} // closed when closeTicker is stopped
hup chan os.Signal
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hupc or hupCh?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ch and Ch have a very distinct meaning in our codebase as they represent the reactor communication channels. So I'd lean towards hupc and try to use it consistently in the codebase. Attempted that with the recent Transport addition in p2p.

t.Errorf("unexpected error %v", e)
}

err = af.Close()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note to reviewers: OpenAutoGroup now returns nil if there's an error

@xla xla changed the title handle SIGHUP explicitly inside autofile libs: Handle SIGHUP explicitly inside autofile Sep 25, 2018
Path string

closeTicker *time.Ticker
closeTickerStopCh chan struct{} // closed when closeTicker is stopped
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to rename this one as well.

Copy link
Contributor

@xla xla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 :octocat: :shipit: 🍡

@xla xla merged commit eb0da7f into develop Sep 25, 2018
@xla xla deleted the 2260-autofile-watchers-refactoring branch September 25, 2018 10:43
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.

3 participants