-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implement session handling for unsubscribe in subxt-client #242
implement session handling for unsubscribe in subxt-client #242
Conversation
05fe7ce
to
a978a4d
Compare
@@ -102,12 +111,19 @@ impl SubxtClient { | |||
pub fn new(mut task_manager: TaskManager, rpc: RpcHandlers) -> Self { | |||
let (to_back, from_front) = mpsc::channel(DEFAULT_CHANNEL_SIZE); | |||
|
|||
let request_id = Arc::new(RwLock::new(u64::MIN)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why you instantiate these here, inside task::spawn
should work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess because the main closure is for each FrontToBack
message. That said the context could be expanded although that is already an extremely indented block of code.
@@ -102,12 +111,19 @@ impl SubxtClient { | |||
pub fn new(mut task_manager: TaskManager, rpc: RpcHandlers) -> Self { | |||
let (to_back, from_front) = mpsc::channel(DEFAULT_CHANNEL_SIZE); | |||
|
|||
let request_id = Arc::new(RwLock::new(u64::MIN)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess because the main closure is for each FrontToBack
message. That said the context could be expanded although that is already an extremely indented block of code.
a978a4d
to
e92383d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Not sure whether to merge this or not, the CI is failing. Says that we should merge this first here: #243. Where will the build errors with |
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
Cargo seems to default to |
Signed-off-by: Gregory Hill <gregorydhill@outlook.com>
e92383d
to
07e0fd5
Compare
Signed-off-by: Gregory Hill gregorydhill@outlook.com