Skip to content

Commit

Permalink
Minor changes based on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kozlovic committed Jul 26, 2016
1 parent 61b0fec commit 6f9d542
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions server/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ type client struct {
parseState

route *route
debug bool
trace bool

flags clientFlag // Compact booleans into a single field. Size will be increased when needed.
Expand Down Expand Up @@ -179,6 +180,7 @@ func (c *client) initClient() {
c.cid = atomic.AddUint64(&s.gcid, 1)
c.bw = bufio.NewWriterSize(c.nc, startBufSize)
c.subs = make(map[string]*subscription)
c.debug = (atomic.LoadInt32(&debug) != 0)
c.trace = (atomic.LoadInt32(&trace) != 0)

// This is a scratch buffer used for processMsg()
Expand Down
4 changes: 2 additions & 2 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ func (s *Server) Shutdown() {
}

// AcceptLoop is exported for easier testing.
func (s *Server) AcceptLoop(clientListenReady chan struct{}) {
func (s *Server) AcceptLoop(clr chan struct{}) {
hp := net.JoinHostPort(s.opts.Host, strconv.Itoa(s.opts.Port))
Noticef("Listening for client connections on %s", hp)
l, e := net.Listen("tcp", hp)
Expand Down Expand Up @@ -383,7 +383,7 @@ func (s *Server) AcceptLoop(clientListenReady chan struct{}) {
s.mu.Unlock()

// Let the caller know that we are ready
close(clientListenReady)
close(clr)

tmpDelay := ACCEPT_MIN_SLEEP

Expand Down

0 comments on commit 6f9d542

Please sign in to comment.