mirror of
https://github.com/LizardByte/Sunshine.git
synced 2024-12-29 12:16:08 +00:00
Move the check for UPnP enabled up to avoid error messages (#748)
This commit is contained in:
parent
7dbd5b41b2
commit
5477f58f18
@ -91,6 +91,10 @@ static std::string_view status_string(int status) {
|
||||
}
|
||||
|
||||
std::unique_ptr<platf::deinit_t> start() {
|
||||
if(!config::sunshine.flags[config::flag::UPNP]) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int err {};
|
||||
|
||||
device_t device { upnpDiscover(2000, nullptr, nullptr, 0, IPv4, 2, &err) };
|
||||
@ -128,10 +132,6 @@ std::unique_ptr<platf::deinit_t> start() {
|
||||
}
|
||||
}
|
||||
|
||||
if(!config::sunshine.flags[config::flag::UPNP]) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto rtsp = std::to_string(map_port(stream::RTSP_SETUP_PORT));
|
||||
auto video = std::to_string(map_port(stream::VIDEO_STREAM_PORT));
|
||||
auto audio = std::to_string(map_port(stream::AUDIO_STREAM_PORT));
|
||||
|
Loading…
Reference in New Issue
Block a user