fix: some fixes when updating the subscription with same protocol/host/port pair but different name

This commit is contained in:
Qv2ray-dev 2020-03-14 16:30:55 +08:00
parent 9966db6e79
commit ca3ab58b72

View File

@ -522,6 +522,7 @@ namespace Qv2ray::core::handlers
UpdateConnection(_conn, config); UpdateConnection(_conn, config);
// Remove Connection Id from the list. // Remove Connection Id from the list.
connectionsOrig.removeAll(_conn); connectionsOrig.removeAll(_conn);
typeMap.remove(typeMap.key(_conn));
} }
else if (canGetOutboundData && typeMap.contains(outboundData)) else if (canGetOutboundData && typeMap.contains(outboundData))
{ {
@ -533,6 +534,7 @@ namespace Qv2ray::core::handlers
RenameConnection(_conn, _alias); RenameConnection(_conn, _alias);
// Remove Connection Id from the list. // Remove Connection Id from the list.
connectionsOrig.removeAll(_conn); connectionsOrig.removeAll(_conn);
nameMap.remove(nameMap.key(_conn));
} }
else else
{ {