func (pgsql *Pgsql) removeTransaction(transList []*PgsqlTransaction, tuple common.TcpTuple, index int) *PgsqlTransaction { trans := transList[index] transList = append(transList[:index], transList[index+1:]...) if len(transList) == 0 { pgsql.transactions.Delete(trans.tuple.Hashable()) } else { pgsql.transactions.Put(tuple.Hashable(), transList) } return trans }
func (thrift *Thrift) ReceivedFin(tcptuple *common.TcpTuple, dir uint8, private protos.ProtocolData) protos.ProtocolData { trans := thrift.getTransaction(tcptuple.Hashable()) if trans != nil { if trans.Request != nil && trans.Reply == nil { logp.Debug("thrift", "FIN and had only one transaction. Assuming one way") thrift.PublishQueue <- trans thrift.transactions.Delete(trans.tuple.Hashable()) } } return private }