Merge pull request #961 from nats-io/fix_start_go_routine_calls

Fixed invocations of startGoRoutine
This commit is contained in:
Ivan Kozlovic
2019-04-18 09:59:39 -06:00
committed by GitHub
3 changed files with 6 additions and 6 deletions

View File

@@ -697,10 +697,10 @@ func (s *Server) createGateway(cfg *gatewayCfg, url *url.URL, conn net.Conn) {
}
// Spin up the read loop.
s.startGoRoutine(c.readLoop)
s.startGoRoutine(func() { c.readLoop() })
// Spin up the write loop.
s.startGoRoutine(c.writeLoop)
s.startGoRoutine(func() { c.writeLoop() })
if tlsRequired {
c.Debugf("TLS handshake complete")

View File

@@ -1192,10 +1192,10 @@ func (s *Server) createRoute(conn net.Conn, rURL *url.URL) *client {
}
// Spin up the read loop.
s.startGoRoutine(c.readLoop)
s.startGoRoutine(func() { c.readLoop() })
// Spin up the write loop.
s.startGoRoutine(c.writeLoop)
s.startGoRoutine(func() { c.writeLoop() })
if tlsRequired {
c.Debugf("TLS handshake complete")

View File

@@ -1529,10 +1529,10 @@ func (s *Server) createClient(conn net.Conn) *client {
c.setPingTimer()
// Spin up the read loop.
s.startGoRoutine(c.readLoop)
s.startGoRoutine(func() { c.readLoop() })
// Spin up the write loop.
s.startGoRoutine(c.writeLoop)
s.startGoRoutine(func() { c.writeLoop() })
if info.TLSRequired {
c.Debugf("TLS handshake complete")