-
Notifications
You must be signed in to change notification settings - Fork 4
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 repeat_last_request functions #40
Conversation
7ef3f2e
to
fd4f01e
Compare
if is_port(socket), do: :inet.setopts(socket, active: false) | ||
|
||
result = | ||
with :ok <- mockable(:gen_tcp).send(socket, request) do | ||
recv(socket, response_timeout) | ||
end | ||
|
||
if is_port(socket), do: :inet.setopts(socket, active: true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's create a dumb socket in tests and remove is_port
checks here
def teardown(session, headers \\ []), do: request(session, "TEARDOWN", headers) | ||
|
||
@spec repeat_last_request(t()) :: Response.result() | ||
def repeat_last_request(session), do: GenServer.call(session, :repeat_last_request) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So instead, as we spoke, let's send the response from the TCP decapsulator back to the RTSP session and remove *_no_response
functions
:tcp_closed
message and terminate immediately