mirror of
https://github.com/buger/goreplay.git
synced 2024-04-21 12:32:02 +00:00
fix crash on missing payload metadata
This commit is contained in:
+1
-1
@@ -61,7 +61,7 @@ func (i *FileInput) emit() {
|
||||
buf := scanner.Bytes()
|
||||
meta := payloadMeta(buf)
|
||||
|
||||
if meta[0][0] == RequestPayload {
|
||||
if len(meta) > 2 && meta[0][0] == RequestPayload {
|
||||
ts, _ := strconv.ParseInt(string(meta[2]), 10, 64)
|
||||
|
||||
if lastTime != 0 {
|
||||
|
||||
Reference in New Issue
Block a user