Skip to content

Commit 4959a4a

Browse files
committed
support ip address
support like mqtt://192.*.**:1883 ip address
1 parent 75414e2 commit 4959a4a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module.exports = {
5252
},
5353
createClient: async function(options) {
5454
if(options.uri) {
55-
var pattern = /^((mqtt[s]?|ws[s]?)?:(\/\/)([a-zA-Z_\.]*):?(\d+))$/;
55+
var pattern = /^((mqtt[s]?|ws[s]?)?:(\/\/)([0-9a-zA-Z_\.]*):?(\d+))$/;
5656
var matches = options.uri.match(pattern);
5757
var protocol = matches[2];
5858
var host = matches[4];

0 commit comments

Comments
 (0)