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:
Lars Karlitski 2019-10-05 23:41:06 +02:00
parent c1dca86505
commit 3d3ffda5d8
2 changed files with 6 additions and 7 deletions

View file

@ -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")