|
|
@@ -512,12 +512,12 @@ func (f *faucet) apiHandler(w http.ResponseWriter, r *http.Request) {
|
|
|
}
|
|
|
continue
|
|
|
}
|
|
|
- f.reqs = append([]*request{{
|
|
|
+ f.reqs = append(f.reqs, &request{
|
|
|
Avatar: avatar,
|
|
|
Account: address,
|
|
|
Time: time.Now(),
|
|
|
Tx: signed,
|
|
|
- }}, f.reqs...)
|
|
|
+ })
|
|
|
timeout := time.Duration(*minutesFlag*int(math.Pow(3, float64(msg.Tier)))) * time.Minute
|
|
|
grace := timeout / 288 // 24h timeout => 5m grace
|
|
|
|
|
|
@@ -670,7 +670,6 @@ func send(conn *wsConn, value interface{}, timeout time.Duration) error {
|
|
|
}
|
|
|
conn.wlock.Lock()
|
|
|
defer conn.wlock.Unlock()
|
|
|
-
|
|
|
conn.conn.SetWriteDeadline(time.Now().Add(timeout))
|
|
|
return conn.conn.WriteJSON(value)
|
|
|
}
|