mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 11:48:43 -07:00
Merge pull request #961 from nats-io/fix_start_go_routine_calls
Fixed invocations of startGoRoutine
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user