diff --git a/src/AWSMQTT.jl b/src/AWSMQTT.jl index 4780954..e5106ae 100644 --- a/src/AWSMQTT.jl +++ b/src/AWSMQTT.jl @@ -222,7 +222,7 @@ function _c_on_connection_interrupted( data = Base.unsafe_pointer_to_objref(userdata)::_OnConnectionInterruptedUserData try - put!(data.ch, _OnConnectionInterruptedEvent(data.callback, connection, error_code)) + put!(data.ch, _OnConnectionInterruptedEvent(data.callback, userdata.conn, error_code)) catch ex if ex isa InvalidStateException && ex.state == :closed else @@ -267,7 +267,7 @@ function _c_on_connection_resumed( data.ch, _OnConnectionResumedEvent( data.callback, - connection, + userdata.conn, aws_mqtt_connect_return_code(return_code), session_present != 0, ),