forked from Elara6331/itd
Add error handling for RPC registration functions
This commit is contained in:
parent
c3a61b5893
commit
0aa89e18b6
12
socket.go
12
socket.go
@ -67,14 +67,12 @@ func startSocket(ctx context.Context, dev *infinitime.Device) error {
|
|||||||
|
|
||||||
mux := drpcmux.New()
|
mux := drpcmux.New()
|
||||||
|
|
||||||
rpc.DRPCRegisterITD(mux, &ITD{
|
err = rpc.DRPCRegisterITD(mux, &ITD{dev})
|
||||||
dev: dev,
|
if err != nil {
|
||||||
})
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
rpc.DRPCRegisterFS(mux, &FS{
|
err = rpc.DRPCRegisterFS(mux, &FS{dev, fs})
|
||||||
dev: dev,
|
|
||||||
fs: fs,
|
|
||||||
})
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user