Skip to content

Commit 89416c8

Browse files
committed
Ignore '-' as ip on devices
1 parent 7263bca commit 89416c8

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
@@ -414,7 +414,9 @@ async fn migrate_devices(
414414
// As we're using a real IP type in the MAS database, it is possible
415415
// that we encounter invalid IP addresses in the Synapse database.
416416
// In that case, we should ignore them, but still log a warning.
417-
let last_active_ip = ip.and_then(|ip| {
417+
// One special case: Synapse will record '-' as IP in some cases, we don't want
418+
// to log about those
419+
let last_active_ip = ip.filter(|ip| ip != "-").and_then(|ip| {
418420
ip.parse()
419421
.map_err(|e| {
420422
tracing::warn!(

0 commit comments

Comments
 (0)