GODT-1779: Remove go-imap

This commit is contained in:
James Houlahan
2022-08-26 17:00:21 +02:00
parent 3b0bc1ca15
commit 39433fe707
593 changed files with 12725 additions and 91626 deletions

View File

@ -20,6 +20,8 @@ package ports
import (
"fmt"
"net"
"github.com/ProtonMail/proton-bridge/v2/internal/constants"
)
const (
@ -32,7 +34,7 @@ func IsPortFree(port int) bool {
return false
}
// First, check localhost only.
if isOccupied(fmt.Sprintf("127.0.0.1:%d", port)) {
if isOccupied(fmt.Sprintf("%v:%d", constants.Host, port)) {
return false
}
// Second, check also ports opened to public.