feat(core): Stop an exception in a handler to deadlock the connection
This commit is contained in:
parent
0a68f09fb4
commit
41b789fa28
@ -23,6 +23,9 @@
|
|||||||
- *BREAKING*: `UserAvatarManager`'s `getAvatarId` with `getLatestMetadata`.
|
- *BREAKING*: `UserAvatarManager`'s `getAvatarId` with `getLatestMetadata`.
|
||||||
- The `PubSubManager` now supports PubSub's `max_items` in `getItems`.
|
- The `PubSubManager` now supports PubSub's `max_items` in `getItems`.
|
||||||
- *BREAKING*: `vCardManager`'s `VCardAvatarUpdatedEvent` no longer automatically requests the newest VCard avatar.
|
- *BREAKING*: `vCardManager`'s `VCardAvatarUpdatedEvent` no longer automatically requests the newest VCard avatar.
|
||||||
|
- *BREAKING*: `XmppConnection` now tries to ensure that incoming data is processed in-order. The only exception are awaited stanzas as they are allowed to bypass the queue.
|
||||||
|
- *BREAKING*: If a stanza handler causes an exception, the handler is simply skipped while processing.
|
||||||
|
- Add better logging around what stanza handler is running and if they end processing early.
|
||||||
|
|
||||||
## 0.3.1
|
## 0.3.1
|
||||||
|
|
||||||
|
@ -685,7 +685,13 @@ class XmppConnection {
|
|||||||
_log.finest(
|
_log.finest(
|
||||||
'Running handler for ${stanza.tag} (${stanza.attributes["id"]}) of $managerName',
|
'Running handler for ${stanza.tag} (${stanza.attributes["id"]}) of $managerName',
|
||||||
);
|
);
|
||||||
|
try {
|
||||||
state = await handler.callback(state.stanza, state);
|
state = await handler.callback(state.stanza, state);
|
||||||
|
} catch (ex) {
|
||||||
|
_log.severe(
|
||||||
|
'Handler from $managerName for ${stanza.tag} (${stanza.attributes["id"]}) failed with "$ex"',
|
||||||
|
);
|
||||||
|
}
|
||||||
if (state.done || state.cancel) {
|
if (state.done || state.cancel) {
|
||||||
_log.finest(
|
_log.finest(
|
||||||
'Processing ended early for ${stanza.tag} (${stanza.attributes["id"]}) by $managerName',
|
'Processing ended early for ${stanza.tag} (${stanza.attributes["id"]}) by $managerName',
|
||||||
|
Loading…
Reference in New Issue
Block a user