diff --git a/handlers/bounty.go b/handlers/bounty.go index 09ef19331..422aaefec 100644 --- a/handlers/bounty.go +++ b/handlers/bounty.go @@ -691,6 +691,9 @@ func (h *bountyHandler) MakeBountyPayment(w http.ResponseWriter, r *http.Request if err == nil { socket.Conn.WriteJSON(msg) } + + h.m.Unlock() + return } else if v2KeysendRes.Status == db.PaymentPending { // Send payment status log.Printf("[bounty] V2 Status is pending: %s", v2KeysendRes.Status) @@ -710,6 +713,9 @@ func (h *bountyHandler) MakeBountyPayment(w http.ResponseWriter, r *http.Request if err == nil { socket.Conn.WriteJSON(msg) } + + h.m.Unlock() + return } else { // Send payment status log.Printf("[bounty] V2 Status Was not completed: %s", v2KeysendRes.Status) @@ -833,8 +839,6 @@ func (h *bountyHandler) MakeBountyPayment(w http.ResponseWriter, r *http.Request return } } - - h.m.Unlock() } func (h *bountyHandler) GetBountyPaymentStatus(w http.ResponseWriter, r *http.Request) {