Skip to content

Commit 9aa7bb2

Browse files
author
clowwindy
committed
try fixing #22
1 parent 781c8de commit 9aa7bb2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

chinadns/dnsrelay.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def _create_sockets(self):
145145
raise Exception("can't get addrinfo for %s:%d" % addr)
146146
af, socktype, proto, canonname, sa = addrs[0]
147147
sock = socket.socket(af, socktype, proto)
148+
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
148149
sock.setblocking(False)
149150
sockets.append(sock)
150151
self._local_sock, self._remote_sock = sockets

0 commit comments

Comments
 (0)