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

Qos not respected on subscription #445

Closed
rafaelnobrekz opened this issue Mar 24, 2022 · 4 comments
Closed

Qos not respected on subscription #445

rafaelnobrekz opened this issue Mar 24, 2022 · 4 comments
Assignees
Labels

Comments

@rafaelnobrekz
Copy link

Hi! Starting to know the library, I noticed that qos1 is hardcoded on MqttSubscription? Does this make sense ?

public func subscribe(_ topic: String, qos: CocoaMQTTQoS = .qos1) {
        let filter = MqttSubscription(topic: topic)
        return subscribe([filter])
    }
@leeway1208
Copy link
Collaborator

It's OK, It's swift syntax to set default values.

@rafaelnobrekz
Copy link
Author

Hi, what I mean is the qos variable is not injected into MqttSubscription object thus what we set is completely ignored

@leeway1208
Copy link
Collaborator

haha. you are right. I will fix it.

@leeway1208 leeway1208 added the bug label Mar 25, 2022
@leeway1208 leeway1208 self-assigned this Mar 25, 2022
leeway1208 added a commit that referenced this issue Mar 25, 2022
…e for differnet version 4.func subscribe qos bug 5.didPublishAck and MqttDecodePubRec may be nil (#445 #446)
@rafaelnobrekz
Copy link
Author

Cool, thanks! I could have made a PR, but I thought maybe I was missing something 🤪

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

No branches or pull requests

2 participants