mirror of
https://github.com/kunkundi/crossdesk.git
synced 2025-10-26 20:25:34 +08:00
Add signal connection status 'NoSuchTransmissionId'
This commit is contained in:
@@ -19,7 +19,8 @@ enum ConnectionStatus {
|
|||||||
Disconnected,
|
Disconnected,
|
||||||
Failed,
|
Failed,
|
||||||
Closed,
|
Closed,
|
||||||
IncorrectPassword
|
IncorrectPassword,
|
||||||
|
NoSuchTransmissionId
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SignalStatus {
|
enum SignalStatus {
|
||||||
|
|||||||
@@ -334,7 +334,11 @@ void PeerConnection::ProcessSignal(const std::string &signal) {
|
|||||||
if (status == "failed") {
|
if (status == "failed") {
|
||||||
std::string reason = j["reason"].get<std::string>();
|
std::string reason = j["reason"].get<std::string>();
|
||||||
LOG_ERROR("{}", reason);
|
LOG_ERROR("{}", reason);
|
||||||
on_connection_status_(ConnectionStatus::IncorrectPassword);
|
if ("Incorrect password" == reason) {
|
||||||
|
on_connection_status_(ConnectionStatus::IncorrectPassword);
|
||||||
|
} else if ("No such transmission id" == reason) {
|
||||||
|
on_connection_status_(ConnectionStatus::NoSuchTransmissionId);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user_id_list_.empty()) {
|
if (user_id_list_.empty()) {
|
||||||
LOG_WARN("Wait for host create transmission [{}]", transmission_id);
|
LOG_WARN("Wait for host create transmission [{}]", transmission_id);
|
||||||
|
|||||||
Reference in New Issue
Block a user