Fixed some network errors.

This commit is contained in:
Revertron
2021-02-19 18:14:48 +01:00
parent f208476ae0
commit 8c9809bc0c
2 changed files with 7 additions and 4 deletions
+2 -2
View File
@@ -175,7 +175,7 @@ impl DnsServer for DnsUdpServer {
/// This method takes ownership of the server, preventing the method from being called multiple times.
fn run_server(self) -> Result<()> {
// Bind the socket
let socket = UdpSocket::bind(("[::]", self.context.dns_port))?;
let socket = UdpSocket::bind(("::", self.context.dns_port))?;
// Spawn threads for handling requests
for thread_id in 0..self.thread_count {
@@ -290,7 +290,7 @@ impl DnsTcpServer {
impl DnsServer for DnsTcpServer {
fn run_server(mut self) -> Result<()> {
let socket = TcpListener::bind(("[::]", self.context.dns_port))?;
let socket = TcpListener::bind(("::", self.context.dns_port))?;
// Spawn threads for handling requests, and create the channels
for thread_id in 0..self.thread_count {