Skip to content

Commit 5de46fb

Browse files
committed
Ignore '-' as ip on devices
1 parent b310ffc commit 5de46fb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/syn2mas/src/migration.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,9 @@ async fn migrate_devices(
562562
// As we're using a real IP type in the MAS database, it is possible
563563
// that we encounter invalid IP addresses in the Synapse database.
564564
// In that case, we should ignore them, but still log a warning.
565-
let last_active_ip = ip.and_then(|ip| {
565+
// One special case: Synapse will record '-' as IP in some cases, we don't want
566+
// to log about those
567+
let last_active_ip = ip.filter(|ip| ip != "-").and_then(|ip| {
566568
ip.parse()
567569
.map_err(|e| {
568570
tracing::warn!(

0 commit comments

Comments
 (0)