LWM2M: Catch client serialization error.
This commit is contained in:
parent
275aac5ddc
commit
f0cd43db5c
@ -94,9 +94,13 @@ public class TbRedisLwM2MClientStore implements TbLwM2MClientStore {
|
||||
if (client.getState().equals(LwM2MClientState.UNREGISTERED)) {
|
||||
log.error("[{}] Client is in invalid state: {}!", client.getEndpoint(), client.getState(), new Exception());
|
||||
} else {
|
||||
byte[] clientSerialized = serialize(client);
|
||||
try (var connection = connectionFactory.getConnection()) {
|
||||
connection.getSet(getKey(client.getEndpoint()), clientSerialized);
|
||||
try {
|
||||
byte[] clientSerialized = serialize(client);
|
||||
try (var connection = connectionFactory.getConnection()) {
|
||||
connection.getSet(getKey(client.getEndpoint()), clientSerialized);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to serialize client: {}", client, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user