Closed the-mikedavis closed 1 year ago
I like the shutdown one better. noproc
more or less never means an intended return value, or at least some people automatically expect it to indicate an unhandled error. WDYT?
Yeah that sounds good to me. noproc
is also a little different than shutdown
here since the server did actually receive the command with shutdown
, so let's go with shutdown
.
Proposed Changes
gen_statem:call/3
can fail if the server shuts down before replying to the call, exiting with{shutdown, Location}
. We can handle this exit like the other exits in thegen_statem_safe_call/3
. I think it makes sense to return{error, noproc}
in this case since it's effectively the same as the server not being alive, but I think an{error, shutdown}
return could be ok as well.Types of Changes
What types of changes does your code introduce to this project? Put an
x
in the boxes that applyChecklist
Put an
x
in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask on the mailing list. We're here to help! This is simply a reminder of what we are going to look for before merging your code.CONTRIBUTING.md
document