WalletConnect / a2

An Asynchronous Apple Push Notification (apns2) Client for Rust
MIT License
136 stars 47 forks source link

Panic: 'executor must be set' from hyper-0.14.15 when running examples. #59

Closed staninprague closed 1 year ago

staninprague commented 2 years ago

When running examples with the current cargo.toml (hyper 0.14), I'm getting the following error from hyper:

thread 'main' panicked at 'executor must be set', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.14.15/src/common/exec.rs:54:21

Happening here in hyper:

                #[cfg(feature = "tcp")]
                {
                    tokio::task::spawn(fut);
                }
                #[cfg(not(feature = "tcp"))]
                {
                    // If no runtime, we need an executor!
                    panic!("executor must be set")
                }

Looking at the above and just adding the "tcp" feature to hyper dependencies fixes the problem:

hyper = { version = "0.14", features = ["client", "http2", "tcp"] }

Does it work for you without the "tcp" feature?