Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function to stop a RTSP server #43

Merged
merged 2 commits into from
Aug 28, 2024
Merged

Add a function to stop a RTSP server #43

merged 2 commits into from
Aug 28, 2024

Conversation

Noarkhh
Copy link
Contributor

@Noarkhh Noarkhh commented Aug 27, 2024

No description provided.

@Noarkhh Noarkhh requested a review from mat-hek August 27, 2024 14:06
Same as `GenServer.stop/2`
"""
@spec stop(pid(), reason :: term(), timeout()) :: :ok
def stop(server, reason \\ :normal, timeout \\ :infinity) do
Copy link
Member

Choose a reason for hiding this comment

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

I think we don't need the reason argument. I'd also accept a keyword to make it more future-proof

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just copied the signature of GenServer.stop/2

Copy link
Member

@mat-hek mat-hek Aug 28, 2024

Choose a reason for hiding this comment

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

Yup, that's the point :P GenServer is generic and RTSP server is not. You don't have RTSPServer.call. I admit it's not a big deal though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

and the keyword would include fields like reason and timeout and also give us ability to add some options later, yes?

Copy link
Member

Choose a reason for hiding this comment

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

I don't see a reason to put the reason there :P So it would be just timeout for now

and also give us ability to add some options later

yeah, without having many default arguments

@Noarkhh Noarkhh merged commit 1e0f75d into master Aug 28, 2024
3 checks passed
@Noarkhh Noarkhh deleted the server-stop branch August 28, 2024 12:58
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.

2 participants