Skip to content

Commit

Permalink
Change the default port to amqps when -S given
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinkoziej committed Dec 4, 2021
1 parent 7adf7c4 commit df544aa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ func getUri() string {
var proto string = "amqp://"
if (ssl) {
proto = "amqps://"
// Change the port from amqp default to amqps default.
// not sure how to check if -P flag was given by the user
// so the perverse situtation where amqps runs on port 5672 would not work sorry
if (port == 5672) {
port = 5671
}
}
return proto + username + ":" + password + "@" + host + ":" + strconv.Itoa(port) + vhost
}
Expand Down

0 comments on commit df544aa

Please sign in to comment.