Committed by
GitHub
fix(socket_notifier): _tryOn() did not cover all cases
When JSON content is a List type, the catch syntax in `_tryOn()` method will fail to catch the error. deleted `on Exception` will fix the bug.
Showing
1 changed file
with
1 additions
and
1 deletions
| @@ -72,7 +72,7 @@ class SocketNotifier { | @@ -72,7 +72,7 @@ class SocketNotifier { | ||
| 72 | if (_onEvents!.containsKey(event)) { | 72 | if (_onEvents!.containsKey(event)) { | 
| 73 | _onEvents![event]!(data); | 73 | _onEvents![event]!(data); | 
| 74 | } | 74 | } | 
| 75 | - } on Exception catch (_) { | 75 | + } catch (_) { | 
| 76 | return; | 76 | return; | 
| 77 | } | 77 | } | 
| 78 | } | 78 | } | 
- 
Please register or login to post a comment