Skip to content

Commit 518cec4

Browse files
Merge pull request #60 from opengsq/alert-autofix-2
Potential fix for code scanning alert no. 2: Binding a socket to all network interfaces
2 parents 75e24ef + 59d429d commit 518cec4

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)