devices: wire close up as rpc method
Normally `DeviceService.close` would be called when the connection was closed on the other end. Expose that close method via RPC so that clients can call it explicitly. This should be mostly useful in testing.
This commit is contained in:
parent
bd0e5f19fd
commit
ce312f47be
1 changed files with 3 additions and 0 deletions
|
|
@ -80,5 +80,8 @@ class DeviceService(host.Service):
|
|||
if method == "open":
|
||||
r = self.open(args["dev"], args["tree"], args["options"])
|
||||
return r, None
|
||||
if method == "close":
|
||||
r = self.close()
|
||||
return r, None
|
||||
|
||||
raise host.ProtocolError("Unknown method")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue