We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9600540 commit 2b6c080Copy full SHA for 2b6c080
src/signer.rs
@@ -151,12 +151,12 @@ impl Signer for GcpSigner {
151
&self,
152
message: &[u8],
153
) -> Result<solana_sdk::signature::Signature, SignerError> {
154
- let rt = tokio::runtime::Runtime::new()
155
- .map_err(|e| SignerError::Custom(format!("Failed to create tokio runtime: {:?}", e)))?;
156
-
157
- rt.block_on(request_sign_data(&self.client, &self.key_name, message))
158
- .and_then(decode_signature)
159
- .map_err(Into::into)
+ tokio::task::block_in_place(|| {
+ tokio::runtime::Handle::current()
+ .block_on(request_sign_data(&self.client, &self.key_name, message))
+ .and_then(decode_signature)
+ .map_err(Into::into)
+ })
160
}
161
162
fn is_interactive(&self) -> bool {
0 commit comments