diff --git a/main.go b/main.go index ce5e830..ee363f3 100644 --- a/main.go +++ b/main.go @@ -7,6 +7,7 @@ import ( "flag" "github.com/elliotchance/phpserialize" _ "github.com/go-sql-driver/mysql" + "io/ioutil" "log" "net" "os" @@ -193,7 +194,7 @@ func handleConnection(conn net.Conn, UC MetadataCache, PC MetadataCache) { log.Println("handleConnection started") var buf []byte var m *MetadataCache - _, err := conn.Read(buf) + buf, err := ioutil.ReadAll(conn) var c cachecommand err = json.Unmarshal(buf, &c) if err != nil {