Skip to content

Commit 59d429d

Browse files
Potential fix for code scanning alert no. 2: Binding a socket to all network interfaces
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 7ac83ed commit 59d429d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

opengsq/protocols/w40kdow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async def get_status(self) -> Status:
4444
# Create UDP socket
4545
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
4646
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
47-
sock.bind(("0.0.0.0", self._port))
47+
sock.bind((self._host, self._port))
4848
sock.setblocking(False)
4949

5050
loop = asyncio.get_running_loop()

0 commit comments

Comments
 (0)