Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
parity
Mirrored projects
jsonrpsee
Commits
99ffeb7b
Unverified
Commit
99ffeb7b
authored
Jun 27, 2022
by
Alexandru Vasile
Browse files
Submit `InvalidParams` if sink was never accepted
Signed-off-by:
Alexandru Vasile
<
alexandru.vasile@parity.io
>
parent
1f66edf1
Changes
1
Show whitespace changes
Inline
Side-by-side
core/src/server/rpc_module.rs
View file @
99ffeb7b
...
@@ -1288,7 +1288,10 @@ impl SubscriptionSink {
...
@@ -1288,7 +1288,10 @@ impl SubscriptionSink {
impl
Drop
for
SubscriptionSink
{
impl
Drop
for
SubscriptionSink
{
fn
drop
(
&
mut
self
)
{
fn
drop
(
&
mut
self
)
{
if
self
.is_active_subscription
()
{
// Subscription was never accepted.
if
let
Ok
(
id
)
=
self
.state
.id
()
{
self
.inner
.send_error
(
id
,
ErrorCode
::
InvalidParams
.into
());
}
else
if
self
.is_active_subscription
()
{
self
.subscribers
.lock
()
.remove
(
&
self
.uniq_sub
);
self
.subscribers
.lock
()
.remove
(
&
self
.uniq_sub
);
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment