mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
util: pass Servers by reference to serve()
This commit modifies nonBlockingGRPCServer.serve() to accept Servers parameter by reference rather than value to prevent copy of a large struct. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
@ -66,7 +66,7 @@ func (s *nonBlockingGRPCServer) Start(
|
||||
middlewareConfig MiddlewareServerOptionConfig,
|
||||
) {
|
||||
s.wg.Add(1)
|
||||
go s.serve(endpoint, *srv, middlewareConfig)
|
||||
go s.serve(endpoint, srv, middlewareConfig)
|
||||
}
|
||||
|
||||
// Wait blocks until the WaitGroup counter.
|
||||
@ -86,7 +86,7 @@ func (s *nonBlockingGRPCServer) ForceStop() {
|
||||
|
||||
func (s *nonBlockingGRPCServer) serve(
|
||||
endpoint string,
|
||||
srv Servers,
|
||||
srv *Servers,
|
||||
middlewareConfig MiddlewareServerOptionConfig,
|
||||
) {
|
||||
proto, addr, err := parseEndpoint(endpoint)
|
||||
|
Reference in New Issue
Block a user