aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src/plugins')
-rw-r--r--azalea-client/src/plugins/join.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/azalea-client/src/plugins/join.rs b/azalea-client/src/plugins/join.rs
index a6c9c586..0f5747e9 100644
--- a/azalea-client/src/plugins/join.rs
+++ b/azalea-client/src/plugins/join.rs
@@ -86,7 +86,8 @@ pub struct ConnectOpts {
#[derive(Message)]
pub struct ConnectionFailedEvent {
pub entity: Entity,
- pub error: ConnectionError,
+ // wrap it in Arc so it can be cloned
+ pub error: Arc<ConnectionError>,
}
pub fn handle_start_join_server_event(
@@ -197,7 +198,10 @@ pub fn poll_create_connection_task(
Ok(conn) => conn,
Err(error) => {
warn!("failed to create connection: {error}");
- connection_failed_events.write(ConnectionFailedEvent { entity, error });
+ connection_failed_events.write(ConnectionFailedEvent {
+ entity,
+ error: Arc::new(error),
+ });
return;
}
};