Skip to content
This repository has been archived by the owner on Mar 16, 2024. It is now read-only.

Commit

Permalink
Add sessions lock
Browse files Browse the repository at this point in the history
  • Loading branch information
CryptoManiac committed Apr 9, 2018
1 parent cff6ba5 commit e12034f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proxy/ethereum_stratum.go
Expand Up @@ -72,6 +72,9 @@ func (s *ProxyServer) makePrefix() string {
func (s *ProxyServer) GetExtraNonce() string {
var extraNonce string

s.sessionsMu.RLock()
defer s.sessionsMu.RUnlock()

for {
extraNonce = s.makePrefix() + randstr.Hex(2)
found := false
Expand Down

0 comments on commit e12034f

Please sign in to comment.