Skip to content

Commit

Permalink
Merge pull request #233 from ska-sa/close-tcp-sockets
Browse files Browse the repository at this point in the history
Close custom TCP sockets
  • Loading branch information
bmerry authored Aug 7, 2023
2 parents 341e6f4 + 7bfbdb0 commit 1938b1d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_passthrough.py
Original file line number Diff line number Diff line change
Expand Up @@ -711,11 +711,14 @@ def prepare_receiver(self, receiver):
self._port = sock.getsockname()[1]
sock.listen(1)
receiver.add_tcp_reader(sock)
sock.close()

def prepare_sender(self, thread_pool):
sock = socket.socket()
sock.connect(("127.0.0.1", self._port))
return spead2.send.TcpStream(thread_pool, sock)
sender = spead2.send.TcpStream(thread_pool, sock)
sock.close()
return sender


class TestPassthroughTcp6(BaseTestPassthrough):
Expand Down

0 comments on commit 1938b1d

Please sign in to comment.