Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaWilkes committed Oct 7, 2024
1 parent 8350ae4 commit bf2df89
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/granted/rds/rds.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,15 +173,15 @@ func listenAndProxy(ctx context.Context, yamuxStreamConnection *yamux.Session, c
if yamuxStreamConnection.IsClosed() {
return clierr.New("failed to accept connection for database client because the proxy server connection has ended", clierr.Infof("Your grant may have expired, you can check the status here: %s and retry connecting", requestURL))
}
go func(databaseClientConn net.Conn) error {
go func(databaseClientConn net.Conn) {
// A stream is opened for this connection, streams are used just like a net.Conn and can read and write data
// A stream can only be opened while the grant is still valid, and each new connection will validate the database parameters username and database
sessionConn, err := yamuxStreamConnection.OpenStream()
if err != nil {
clio.Error("Failed to establish a new connection to the remote database via the proxy server.")
clio.Error(err)
clio.Infof("Your grant may have expired, you can check the status here: %s", requestURL)
return nil
return
}

clio.Infof("Connection accepted for session [%v]", sessionConn.StreamID())
Expand All @@ -205,7 +205,7 @@ func listenAndProxy(ctx context.Context, yamuxStreamConnection *yamux.Session, c
clio.Debugw("error writing data from server to client usually this is just because the database proxy session ended.", "streamId", sessionConn.StreamID(), zap.Error(err))
}
}()
return nil
return

Check failure on line 208 in pkg/granted/rds/rds.go

View workflow job for this annotation

GitHub Actions / Go Lint

S1023: redundant `return` statement (gosimple)
}(result.conn)
}
}
Expand Down

0 comments on commit bf2df89

Please sign in to comment.