Skip to content

Commit

Permalink
Merge pull request #4 from sipcapture/fix_mem
Browse files Browse the repository at this point in the history
Fix mem
  • Loading branch information
adubovikov authored Oct 31, 2023
2 parents 8ebb414 + 9c29bb7 commit 30b9b2d
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions HFP.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"bytes"
"crypto/tls"
"flag"
"fmt"
Expand All @@ -17,7 +16,7 @@ import (
"github.com/ivlovric/HFP/queue"
)

const AppVersion = "0.56.7"
const AppVersion = "0.56.8"

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 @@ -124,8 +123,6 @@ func handleConnection(clientConn net.Conn) {
}
}()

var bufferPool bytes.Buffer

// use a buffer to transfer data between connections
buf := make([]byte, 65535)

Expand All @@ -141,8 +138,6 @@ func handleConnection(clientConn net.Conn) {
return
}

bufferPool.Write(buf[:n])

if *Debug == "on" {
log.Println("-->|| Got", n, "bytes on wire -- Total buffer size:", len(buf))
}
Expand Down

0 comments on commit 30b9b2d

Please sign in to comment.