Fixed invocations of startGoRoutine

Resolves #960

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2019-04-17 19:46:19 -06:00
parent b1d0ec10c6
commit bf07862140
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")