diff options
author | Dimitri Sokolyuk <demon@dim13.org> | 2016-01-17 19:19:54 +0100 |
---|---|---|
committer | Dimitri Sokolyuk <demon@dim13.org> | 2016-01-17 19:19:54 +0100 |
commit | b55706fa1fc947ab798016dcbedf09d3c063e5cb (patch) | |
tree | ea4f52f82b5aa0f984e8dcb69ffedfb1060c5d7c | |
parent | e7174c090a23fe437d717d01fce44196305dea5f (diff) |
Consume unused nonces
-rw-r--r-- | README.md | 1 | ||||
-rw-r--r-- | provider.go | 4 |
2 files changed, 5 insertions, 0 deletions
@@ -94,5 +94,6 @@ slogin -R \*:80:localhost:8080 -N root@docker.moccu.com # redesign +- provider -> nonce - account -> signer - desire -> map[domain]signer diff --git a/provider.go b/provider.go index 755e8c6..ef7d85a 100644 --- a/provider.go +++ b/provider.go @@ -41,6 +41,10 @@ func (p Provider) nonce(resp *http.Response) { p.nonces <- rn } log.Println("# nonces", len(p.nonces)) + for len(p.nonces) > 10 { + <-p.nonces + } + log.Println("# nonces", len(p.nonces)) } // NewProvider fetches directory and initializes nonce |