Skip to content

Commit

Permalink
Improve tcp debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
urso committed Dec 10, 2015
1 parent 44ff057 commit 37c2123
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions packetbeat/protos/tcp/tcp.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,17 @@ func (tcp *Tcp) getStream(pkt *protos.Packet) (stream TcpStream, created bool) {
return TcpStream{}, false
}

timeout := time.Duration(0)
var timeout time.Duration
mod := tcp.protocols.GetTcp(protocol)
if mod != nil {
timeout = mod.ConnectionTimeout()
}

if isDebug {
debugf("Connection doesn't exist, creating new")
t := pkt.Tuple
debugf("Connection src[%s:%d] dst[%s:%d] doesn't exist, creating new",
t.Src_ip.String(), t.Src_port,
t.Dst_ip.String(), t.Dst_port)
}

conn := &TcpConnection{
Expand Down

0 comments on commit 37c2123

Please sign in to comment.