Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Fix for 19: Role closed messages #41

Merged
merged 4 commits into from
Jan 25, 2016

Conversation

jtmoulia
Copy link
Contributor

This PR is for issue #19, though it also contains some other fixes found along the way.

When a command is interrupted, it will notify its owner of the interruption with a message identifying the command. This will prevent calls waiting until timeout (potentially forever) while waiting for a response.

The on_close role callbacks are now properly called on termination.

Note: the Message.receive_macro now includes a clause for handling these messages, but it might be improved to take advantage of more specific matching.

When a command is interrupted, it will notify its owner of the
interruption with a message identifying the command. This will prevent
calls waiting until timeout (potentially forever) while waiting for a
response.

The on_close role callbacks are now properly called on termination.

Note: the Message.receive_macro now includes a clause for handling these
messages, but it might be improved to take advantage of more specific
matching.

This commit also includes some cleanup of the Publisher role -- it was
carrying around unnecessary state.
Inline with the rest of OTP, `state` should be the final element of the
return tuples.
By handing the unexpected error return in the case statement, the error
would be silently swallowed.

Additional small whitespace cleanup -- couldn't resist.
jtmoulia added a commit that referenced this pull request Jan 25, 2016
@jtmoulia jtmoulia merged commit daba475 into MyMedsAndMe:master Jan 25, 2016
@jtmoulia jtmoulia deleted the fix/19-close-messages branch January 25, 2016 01:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant