diff --git a/go.mod b/go.mod index 9c1bfe78..836d5f7b 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/anacrolix/log v0.7.1-0.20200604014615-c244de44fd2d github.com/anacrolix/missinggo v1.2.1 github.com/anacrolix/missinggo/perf v1.0.0 - github.com/anacrolix/missinggo/v2 v2.4.1-0.20200419051441-747d9d7544c6 + github.com/anacrolix/missinggo/v2 v2.4.1-0.20201115225934-0b235ba7a31c github.com/anacrolix/multiless v0.0.0-20200413040533-acfd16f65d5d github.com/anacrolix/sync v0.2.0 github.com/anacrolix/tagflag v1.1.1-0.20200411025953-9bb5209d56c2 @@ -44,4 +44,4 @@ go 1.13 exclude bazil.org/fuse v0.0.0-20200419173433-3ba628eaf417 -replace crawshaw.io/sqlite => github.com/zombiezen/sqlite v0.3.3-0.20200630223153-bdd2fdca1601 +replace crawshaw.io/sqlite => github.com/getlantern/sqlite v0.3.3-0.20201116012831-1a85f453b62f diff --git a/go.sum b/go.sum index e87b8af2..16cc3a04 100644 --- a/go.sum +++ b/go.sum @@ -102,6 +102,8 @@ github.com/anacrolix/missinggo/v2 v2.4.1-0.20200227072623-f02f6484f997 h1:ufGZtS github.com/anacrolix/missinggo/v2 v2.4.1-0.20200227072623-f02f6484f997/go.mod h1:KY+ij+mWvwGuqSuecLjjPv5LFw5ICUc1UvRems3VAZE= github.com/anacrolix/missinggo/v2 v2.4.1-0.20200419051441-747d9d7544c6 h1:fdN9PQuTXSG8+kRrw200fiTnOBkW5sE0YQKws8VEMVs= github.com/anacrolix/missinggo/v2 v2.4.1-0.20200419051441-747d9d7544c6/go.mod h1:HYuCbwvJXY3XbcmcIcTgZXHleoDXawxPWx/YiPzFzV0= +github.com/anacrolix/missinggo/v2 v2.4.1-0.20201115225934-0b235ba7a31c h1:xUFW+Xw1wIojhQrsj9Lo9u3n6EWOCKhSBpKXNdXGcfE= +github.com/anacrolix/missinggo/v2 v2.4.1-0.20201115225934-0b235ba7a31c/go.mod h1:HYuCbwvJXY3XbcmcIcTgZXHleoDXawxPWx/YiPzFzV0= github.com/anacrolix/mmsg v0.0.0-20180515031531-a4a3ba1fc8bb h1:2Or5ccMoY4Kfao+WdL2w6tpY6ZEe+2VTVbIPd7A/Ajk= github.com/anacrolix/mmsg v0.0.0-20180515031531-a4a3ba1fc8bb/go.mod h1:x2/ErsYUmT77kezS63+wzZp8E3byYB0gzirM/WMBLfw= github.com/anacrolix/mmsg v1.0.0 h1:btC7YLjOn29aTUAExJiVUhQOuf/8rhm+/nWCMAnL3Hg= @@ -200,6 +202,10 @@ github.com/fsnotify/fsnotify v1.4.7 h1:IXs+QLmnXW2CcXuY+8Mzv/fWEsPGWxqefPtCP5CnV github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= +github.com/getlantern/sqlite v0.3.3-0.20201103063227-664115871b1c h1:y2FoHghKLgoeBR+U9FF0i0V9O6DH+WNvJGurCcX0NcI= +github.com/getlantern/sqlite v0.3.3-0.20201103063227-664115871b1c/go.mod h1:igAO5JulrQ1DbdZdtVq48mnZUBAPOeFzer7VhDWNtW4= +github.com/getlantern/sqlite v0.3.3-0.20201116012831-1a85f453b62f h1:NWQ42AgkGtGI264rmz30mr1+2dirir09FCkjd0R4Ejc= +github.com/getlantern/sqlite v0.3.3-0.20201116012831-1a85f453b62f/go.mod h1:igAO5JulrQ1DbdZdtVq48mnZUBAPOeFzer7VhDWNtW4= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0= github.com/glycerine/go-unsnap-stream v0.0.0-20180323001048-9f0cb55181dd h1:r04MMPyLHj/QwZuMJ5+7tJcBr1AQjpiAK/rZWRrQT7o= diff --git a/storage/sqlite/sqlite-storage.go b/storage/sqlite/sqlite-storage.go index 9933290e..cb2d98a3 100644 --- a/storage/sqlite/sqlite-storage.go +++ b/storage/sqlite/sqlite-storage.go @@ -477,6 +477,9 @@ func (me connBlob) Close() error { func (i instance) Get() (ret io.ReadCloser, err error) { conn := i.getConn() + if conn == nil { + panic("nil sqlite conn") + } blob, err := i.openBlob(conn, false, true) if err != nil { i.putConn(conn)