Skip to content
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

Small 1-line fix (add Send to dyn Collector) #79

Closed
tbraun96 opened this issue Aug 7, 2021 · 0 comments · Fixed by webrtc-rs/stun#4
Closed

Small 1-line fix (add Send to dyn Collector) #79

tbraun96 opened this issue Aug 7, 2021 · 0 comments · Fixed by webrtc-rs/stun#4

Comments

@tbraun96
Copy link

tbraun96 commented Aug 7, 2021

Change

struct ClientSettings {
    buffer_size: usize,
    rto: Duration,
    rto_rate: Duration,
    max_attempts: u32,
    closed: bool,
    //handler: Handler,
    collector: Option<Box<dyn Collector>>,
    c: Option<Arc<dyn Conn + Send + Sync>>,
}

to

struct ClientSettings {
    buffer_size: usize,
    rto: Duration,
    rto_rate: Duration,
    max_attempts: u32,
    closed: bool,
    //handler: Handler,
    collector: Option<Box<dyn Collector + Send>>,
    c: Option<Arc<dyn Conn + Send + Sync>>,
}

Otherwise, the stun client is !Send, and cannot be spawned as a task on a threadpool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant