joncrlsn / dque

dque is a fast, embedded, durable queue for Go
MIT License
767 stars 46 forks source link

releases the lock when load fail #27

Open DanielLeung opened 3 years ago

DanielLeung commented 3 years ago

for some reason, load() may fail when we init dque. the lock should be releases that we could reinitialize dque

if err := q.lock(); err != nil { return nil, err } if err := q.load(); err != nil { return nil, err }

joncrlsn commented 3 years ago

Hi Daniel, can you create a Pull Request?