remoteloop: don't close a socket it didn't open
Closing the socket is the responsibility of whoever opened it. Fix this in the only user (qemu assembler) by using socket() in a `with` block, which closes the socket on exit.
This commit is contained in:
parent
c1dca86505
commit
3d3ffda5d8
2 changed files with 6 additions and 7 deletions
|
|
@ -112,9 +112,6 @@ class LoopClient:
|
|||
def __init__(self, sock):
|
||||
self.sock = sock
|
||||
|
||||
def __del__(self):
|
||||
self.sock.close()
|
||||
|
||||
def create_device(self, fd, dir_fd=None, offset=None, sizelimit=None):
|
||||
req = {}
|
||||
fds = array.array("i")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue