Permalink
Browse files

Merge branch 'master' of github.com:ngmoco/falcore

  • Loading branch information...
2 parents ccc9ab9 + b6ed708 commit d4ef385d74b5b0e5ff4e0db966eee6a95a636f95 @dgrijalva dgrijalva committed Mar 28, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 request.go
View
4 request.go
@@ -42,6 +42,7 @@ type Request struct {
EndTime time.Time
HttpRequest *http.Request
Connection net.Conn
+ RemoteAddr *net.TCPAddr
PipelineStageStats *list.List
CurrentStage *PipelineStageStat
pipelineHash hash.Hash32
@@ -55,6 +56,9 @@ func newRequest(request *http.Request, conn net.Conn, startTime time.Time) *Requ
fReq.HttpRequest = request
fReq.StartTime = startTime
fReq.Connection = conn
+ if conn != nil {
+ fReq.RemoteAddr = conn.RemoteAddr().(*net.TCPAddr)
+ }
// create a semi-unique id to track a connection in the logs
// ID is the least significant decimal digits of time with some randomization
// the last 3 zeros of time.Nanoseconds appear to always be zero

0 comments on commit d4ef385

Please sign in to comment.