Comments (2)
in options.go this function handles adding servers to the list of brokers to connect to
func (o *ClientOptions) AddBroker(server string) *ClientOptions {
brokerURI, _ := url.Parse(server)
o.Servers = append(o.Servers, brokerURI)
return o
}
As you can see we ignore the err returned from url.Parse() which will happen when you try and add an invalid url such as one with a space in, which results in a nil entry being added to the slice.
from paho.mqtt.golang.
The change I've made won't add the url to the slice if the parse fails, but it will do this silently.
from paho.mqtt.golang.
Related Issues (20)
- MQTTv5: Publish Release encoding is invalid HOT 1
- Duplicate Callback Execution Issue in MQTT Subscription with Wildcard Subscriptions HOT 3
- Why is the release version V1.4.3 and not v1.4.3? HOT 3
- Dual Licensing EDL 1.0 HOT 2
- support of shared subscription in paho.mqtt.golang HOT 5
- No error is returned when I cannot subscribe to a topic. HOT 4
- Understanding DUP messages, and manually set DUP flag. HOT 2
- Feature Request: support json.RawMessage as payload for publishing messages HOT 2
- Any way to retry Publish messages, when QOS is 1 HOT 2
- token.WaitTimeout There is an error missing. HOT 5
- Data race condition HOT 2
- Need to get explicit ACK events HOT 2
- Client.OptionsReader() returns a struct ClientOptionsReader instead of interface which make mocking impossible HOT 4
- Race Condition when subscribing to a topic with a retained message HOT 3
- Unable to recover from "not currently connected and ResumeSubs not set" error HOT 10
- 32 bit bullseye and paho-mqtt 2.0 HOT 2
- MQTT θΏζ₯ε€±θ΄₯: status can only transition to connecting from disconnected HOT 1
- Unable to build using latest version from master HOT 2
- Need a function to get the ClientID of the message sender HOT 4
- goroutine leak when connectionUp(true) return error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paho.mqtt.golang.