Skip to content

Commit

Permalink
Fix setting Port
Browse files Browse the repository at this point in the history
The CLI was not setting the Port, so this wasn't getting passed to the
metadata causing clients to get back Ports of 0 which didn't work.
  • Loading branch information
zorkian authored and travisjeffery committed Jan 27, 2017
1 parent 1847dc4 commit 67f2dce
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Binary file added cmd/jocko/jocko
Binary file not shown.
7 changes: 7 additions & 0 deletions cmd/jocko/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package main

import (
"fmt"
"net"
"os"
"time"

Expand Down Expand Up @@ -33,6 +34,11 @@ func main() {
}
logger := simplelog.New(os.Stdout, logLevel, "jocko")

addr, err := net.ResolveTCPAddr("tcp", *tcpAddr)
if err != nil {
panic(err)
}

store, err := broker.New(*brokerID,
broker.DataDir(*logDir),
broker.LogDir(*logDir),
Expand All @@ -41,6 +47,7 @@ func main() {
broker.RaftPort(*raftPort),
broker.SerfPort(*serfPort),
broker.SerfMembers(*serfMembers),
broker.Port(addr.Port),
)
if err != nil {
fmt.Fprintf(os.Stderr, "Error with new broker: %s\n", err)
Expand Down

0 comments on commit 67f2dce

Please sign in to comment.