Skip to content

Commit

Permalink
no close on error connect
Browse files Browse the repository at this point in the history
  • Loading branch information
adubovikov committed Sep 29, 2023
1 parent f122b23 commit 802c230
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions HFP.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/ivlovric/HFP/queue"
)

const AppVersion = "0.56.5"
const AppVersion = "0.56.6"

var localAddr *string = flag.String("l", ":9060", "Local HEP listening address")
var remoteAddr *string = flag.String("r", "192.168.2.2:9060", "Remote HEP address")
Expand Down Expand Up @@ -87,12 +87,6 @@ func connectToHEPBackend() error {
if err != nil {
log.Println("Unable to connect to server: ", err)
connectionStatus.Set(0)

if hepConnect != nil {
log.Println("Lets close the connection if it still valid")
hepConnect.Close()
}

return fmt.Errorf("couldn't connect to server: %s", err.Error())
} else {
log.Println("Connected to server successfully")
Expand Down

0 comments on commit 802c230

Please sign in to comment.