mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-07 17:15:56 +00:00
check error as string
This commit is contained in:
parent
1f6ed4feca
commit
2713be9329
1 changed files with 2 additions and 1 deletions
|
|
@ -18,6 +18,7 @@ import (
|
|||
"fmt"
|
||||
"log"
|
||||
"net"
|
||||
"strings"
|
||||
"syscall"
|
||||
)
|
||||
|
||||
|
|
@ -52,7 +53,7 @@ func GetPorts(wrapper func([]int) error, requestedPorts, retries int) error {
|
|||
}
|
||||
// send to wrapper and check output error
|
||||
err := wrapper(ports)
|
||||
if err == syscall.EADDRINUSE {
|
||||
if (err != nil) && (err == syscall.EADDRINUSE || strings.Contains(err.Error(), "address already in use")) {
|
||||
log.Println("[port_mapper] address already in use error calling the wrapper", err)
|
||||
// only retry on address already in use error
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue