Selaa lähdekoodia

Add sync lock to create job functions

Add sync lock to make create job calls thread safe.
tags/0.2
Christoffer Fjellström GitHub 7 vuotta sitten
vanhempi
commit
d6791e2e42
1 muutettua tiedostoa jossa 2 lisäystä ja 0 poistoa
  1. +2
    -0
      client/client.go

+ 2
- 0
client/client.go Näytä tiedosto

@@ -221,6 +221,8 @@ func (client *Client) do(funcname string, data []byte,
return "", ErrLostConn
}
var result = make(chan handleOrError, 1)
client.Lock()
defer client.Unlock()
client.lastcall = "c"
client.innerHandler.put("c", func(resp *Response) {
if resp.DataType == dtError {


Loading…
Peruuta
Tallenna