Skip to content

Commit 7ec113d

Browse files
committed
Ignore '-' as ip on devices
1 parent 6ecae34 commit 7ec113d

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
@@ -512,7 +512,9 @@ async fn migrate_devices(
512512
// As we're using a real IP type in the MAS database, it is possible
513513
// that we encounter invalid IP addresses in the Synapse database.
514514
// In that case, we should ignore them, but still log a warning.
515-
let last_active_ip = ip.and_then(|ip| {
515+
// One special case: Synapse will record '-' as IP in some cases, we don't want
516+
// to log about those
517+
let last_active_ip = ip.filter(|ip| ip != "-").and_then(|ip| {
516518
ip.parse()
517519
.map_err(|e| {
518520
tracing::warn!(

0 commit comments

Comments
 (0)