Add error handling for RPC registration functions

This commit is contained in:
Elara 2023-01-03 16:47:25 -08:00
parent c3a61b5893
commit 0aa89e18b6

View File

@ -67,14 +67,12 @@ func startSocket(ctx context.Context, dev *infinitime.Device) error {
mux := drpcmux.New()
rpc.DRPCRegisterITD(mux, &ITD{
dev: dev,
})
err = rpc.DRPCRegisterITD(mux, &ITD{dev})
if err != nil {
return err
}
rpc.DRPCRegisterFS(mux, &FS{
dev: dev,
fs: fs,
})
err = rpc.DRPCRegisterFS(mux, &FS{dev, fs})
if err != nil {
return err
}