Skip to content
This repository has been archived by the owner on Apr 20, 2019. It is now read-only.

Commit

Permalink
cosmetic, gofmt
Browse files Browse the repository at this point in the history
  • Loading branch information
temoto committed Jan 11, 2011
1 parent aa9c8ad commit 0b1cb8b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
6 changes: 4 additions & 2 deletions io-worker/fetch.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type Client struct {
fetch_lk sync.Mutex

// Internal IO operations lock.
lk sync.Mutex
lk sync.Mutex
}

type FetchResult struct {
Expand Down Expand Up @@ -159,7 +159,9 @@ func (client *Client) GetResponse() (resp *http.Response, err os.Error) {
// Use those two functions if you want pipelining.
func (client *Client) Request(req *http.Request) (resp *http.Response, err os.Error) {
err = client.SendRequest(req)
if err != nil { return nil, err }
if err != nil {
return nil, err
}
resp, err = client.GetResponse()
return
}
Expand Down
10 changes: 5 additions & 5 deletions io-worker/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@ type Worker struct {
func newWorker() *Worker {
return &Worker{
FollowRedirects: 1,
IOTimeout: 1e9,
FetchTimeout: 60e9,
KeepAlive: 60,
clients: make(map[string]*Client, 1000),
cl_lk: new(sync.Mutex),
IOTimeout: 1e9,
FetchTimeout: 60e9,
KeepAlive: 60,
clients: make(map[string]*Client, 1000),
cl_lk: new(sync.Mutex),
}
}

Expand Down

0 comments on commit 0b1cb8b

Please sign in to comment.