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

Don't override the default port if a value of 0 is sent explicitly #1754

Merged
merged 1 commit into from Oct 19, 2021
Merged

Don't override the default port if a value of 0 is sent explicitly #1754

merged 1 commit into from Oct 19, 2021

Conversation

macabu
Copy link
Contributor

@macabu macabu commented May 11, 2020

Some encoders like the Cerevo LiveShell 2 will send explicitly port 0 if you don't set any port. While it should default to not send any actual port or default the protocol's default (1935 for RTMP etc), it doesn't do that unfortunately.

[2020-05-11 13:28:40.286][Error][1][5645][11] serve error code=2006 : service cycle : rtmp: stream service : discovery tcUrl failed, tcUrl=rtmp://localhost:0/live, schema=rtmp, vhost=__defaultVhost__, port=0, app=live
thread [1][5645]: do_cycle() [src/app/srs_app_rtmp_conn.cpp:210][errno=11]
thread [1][5645]: service_cycle() [src/app/srs_app_rtmp_conn.cpp:399][errno=11]
thread [1][5645]: stream_service_cycle() [src/app/srs_app_rtmp_conn.cpp:457][errno=11](Resource temporarily unavailable)

This small patch makes it so that if a port 0 is sent, the default value of port will not be overridden.

@macabu macabu closed this May 25, 2020
@macabu macabu deleted the bugfix/cerevo-port-0 branch May 25, 2020 13:40
@macabu macabu restored the bugfix/cerevo-port-0 branch May 25, 2020 13:40
@macabu macabu reopened this May 25, 2020
@codecov-commenter
Copy link

codecov-commenter commented May 25, 2020

Codecov Report

Merging #1754 into develop will increase coverage by 0.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #1754      +/-   ##
===========================================
+ Coverage    58.13%   58.16%   +0.03%     
===========================================
  Files          116      116              
  Lines        48306    48286      -20     
===========================================
+ Hits         28082    28086       +4     
+ Misses       20224    20200      -24     

| Impacted Files | Coverage Δ | |'

'| Impacted Files | Coverage Δ | |
|---|---|---|
| trunk/src/kernel/srs_kernel_utility.cpp | 93.38% <100.00%> (ø) | |
| trunk/src/utest/srs_utest_kernel.cpp | 98.43% <100.00%> (+<0.01%) | ⬆️ |
| trunk/src/core/srs_core_autofree.hpp | 88.88% <0.00%> (-11.12%) | ⬇️ |
| trunk/src/app/srs_app_gb28181.hpp | 0.00% <0.00%> (ø) | |
| trunk/src/app/srs_app_rtc_sdp.hpp | 0.00% <0.00%> (ø) | |

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b9887b...5633af0. Read the comment docs.

TRANS_BY_GPT3

@winlinvip winlinvip self-assigned this Aug 27, 2021
@winlinvip winlinvip added this to the SRS 4.0 release milestone Aug 27, 2021
@winlinvip
Copy link
Member

👍

I will merge this to SRS 4.0.

Very nice PR with utest.

@winlinvip winlinvip merged commit 9a017f4 into ossrs:develop Oct 19, 2021
@winlinvip winlinvip added the TransByAI Translated by AI/GPT. label Jul 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TransByAI Translated by AI/GPT.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants