Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,10 @@ func dial(unixSocketPath string, timeout time.Duration) (*grpc.ClientConn, error

// Start the gRPC server of the device plugin
func (m *SmarterDevicePlugin) Start() error {
err := m.cleanup()
if err != nil {
return err
}

sock, err := net.Listen("unix", m.socket)
if err != nil {
return err
cleanupErr := m.cleanup()
return fmt.Errorf("unable to bind to socket: %v, cleanup err is %v", err, cleanupErr)
}

m.server = grpc.NewServer([]grpc.ServerOption{}...)
Expand Down