mirror of
https://github.com/fosrl/olm.git
synced 2026-03-02 08:46:44 +00:00
Remove annoying sleep and debug logs
This commit is contained in:
@@ -84,9 +84,6 @@ func configureWindows(interfaceName string, ip net.IP, ipNet *net.IPNet) error {
|
|||||||
return fmt.Errorf("netsh enable interface command failed: %v, output: %s", err, out)
|
return fmt.Errorf("netsh enable interface command failed: %v, output: %s", err, out)
|
||||||
}
|
}
|
||||||
|
|
||||||
// delay 2 seconds
|
|
||||||
time.Sleep(8 * time.Second)
|
|
||||||
|
|
||||||
// Wait for the interface to be up and have the correct IP
|
// Wait for the interface to be up and have the correct IP
|
||||||
err = waitForInterfaceUp(interfaceName, ip, 30*time.Second)
|
err = waitForInterfaceUp(interfaceName, ip, 30*time.Second)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -143,14 +143,14 @@ func (c *Client) TestConnection(ctx context.Context) (bool, time.Duration) {
|
|||||||
return false, 0
|
return false, 0
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Debug("Attempting to send monitor packet to %s", c.serverAddr)
|
// logger.Debug("Attempting to send monitor packet to %s", c.serverAddr)
|
||||||
_, err := c.conn.Write(packet)
|
_, err := c.conn.Write(packet)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.connLock.Unlock()
|
c.connLock.Unlock()
|
||||||
logger.Info("Error sending packet: %v", err)
|
logger.Info("Error sending packet: %v", err)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
logger.Debug("Successfully sent monitor packet")
|
// logger.Debug("Successfully sent monitor packet")
|
||||||
|
|
||||||
// Set read deadline
|
// Set read deadline
|
||||||
c.conn.SetReadDeadline(time.Now().Add(c.timeout))
|
c.conn.SetReadDeadline(time.Now().Add(c.timeout))
|
||||||
|
|||||||
Reference in New Issue
Block a user