File tree Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Expand file tree Collapse file tree 2 files changed +21
-13
lines changed Original file line number Diff line number Diff line change 23
23
<ItemGroup >
24
24
<PackageReference Include =" Casbin.NET" Version =" 2.1.1" />
25
25
<PackageReference Include =" StackExchange.Redis" Version =" 2.7.17" />
26
- <PackageReference Include =" System.Text.Json" Version =" 8.0.1" />
26
+ <PackageReference Include =" System.Text.Json" Version =" 8.0.1" Condition = " '$(TargetFramework)'=='netstandard2.1' " />
27
27
</ItemGroup >
28
28
29
29
<ItemGroup >
Original file line number Diff line number Diff line change @@ -148,14 +148,18 @@ private void Subscribe()
148
148
var isSelf = message . Id == Id ;
149
149
if ( ! ( isSelf && _options . IgnoreSelf ) )
150
150
{
151
- if ( _callbackWithMessage != null )
151
+ try
152
152
{
153
- _callbackWithMessage . Invoke ( message ) ;
154
- }
155
- else
156
- {
157
- _callback ? . Invoke ( ) ;
153
+ if ( _callbackWithMessage != null )
154
+ {
155
+ _callbackWithMessage . Invoke ( message ) ;
156
+ }
157
+ else
158
+ {
159
+ _callback ? . Invoke ( ) ;
160
+ }
158
161
}
162
+ catch { }
159
163
}
160
164
} ) ;
161
165
}
@@ -170,14 +174,18 @@ private void SubscribeAsync()
170
174
var isSelf = message . Id == Id ;
171
175
if ( ! ( isSelf && _options . IgnoreSelf ) )
172
176
{
173
- if ( _asyncCallbackWithMessage != null )
174
- {
175
- _asyncCallbackWithMessage . Invoke ( message ) ;
176
- }
177
- else
177
+ try
178
178
{
179
- _asyncCallback ? . Invoke ( ) ;
179
+ if ( _asyncCallbackWithMessage != null )
180
+ {
181
+ _asyncCallbackWithMessage . Invoke ( message ) ;
182
+ }
183
+ else
184
+ {
185
+ _asyncCallback ? . Invoke ( ) ;
186
+ }
180
187
}
188
+ catch { }
181
189
}
182
190
} ) ;
183
191
}
You can’t perform that action at this time.
0 commit comments