Skip to content

Commit 09d6d59

Browse files
committed
Ignore '-' as ip on devices
1 parent c9426f8 commit 09d6d59

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
@@ -527,7 +527,9 @@ async fn migrate_devices(
527527
// As we're using a real IP type in the MAS database, it is possible
528528
// that we encounter invalid IP addresses in the Synapse database.
529529
// In that case, we should ignore them, but still log a warning.
530-
let last_active_ip = ip.and_then(|ip| {
530+
// One special case: Synapse will record '-' as IP in some cases, we don't want
531+
// to log about those
532+
let last_active_ip = ip.filter(|ip| ip != "-").and_then(|ip| {
531533
ip.parse()
532534
.map_err(|e| {
533535
tracing::warn!(

0 commit comments

Comments
 (0)