Merge lp:~michihenning/storage-framework/delete-later into lp:storage-framework/devel

Proposed by Michi Henning
Status: Merged
Approved by: James Henstridge
Approved revision: 65
Merged at revision: 65
Proposed branch: lp:~michihenning/storage-framework/delete-later
Merge into: lp:storage-framework/devel
Diff against target: 51 lines (+4/-4)
4 files modified
src/qt/client/internal/local_client/DownloaderImpl.cpp (+1/-1)
src/qt/client/internal/local_client/UploaderImpl.cpp (+1/-1)
src/qt/client/internal/remote_client/DownloaderImpl.cpp (+1/-1)
src/qt/client/internal/remote_client/UploaderImpl.cpp (+1/-1)
To merge this branch: bzr merge lp:~michihenning/storage-framework/delete-later
Reviewer Review Type Date Requested Status
unity-api-1-bot continuous-integration Approve
James Henstridge Approve
Review via email: mp+304585@code.launchpad.net

Commit message

Use custom deleter for sockets given to client, so the socket is destroyed when the event loop is re-entered.

Description of the change

Use custom deleter for sockets given to client, so the socket is destroyed when the event loop is re-entered.

To post a comment you must log in.
Revision history for this message
James Henstridge (jamesh) wrote :

Looks good.

review: Approve
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :

PASSED: Continuous integration, rev:65
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/103/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build/534
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-0-fetch/540
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=vivid+overlay/442
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=xenial+overlay/442
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-1-sourcepkg/release=yakkety/442
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=vivid+overlay/372/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=xenial+overlay/372/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=amd64,release=yakkety/372/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=vivid+overlay/372/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=xenial+overlay/372/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=armhf,release=yakkety/372/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=vivid+overlay/372/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=xenial+overlay/372/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/372
        deb: https://jenkins.canonical.com/unity-api-1/job/build-2-binpkg/arch=i386,release=yakkety/372/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/unity-api-1/job/lp-storage-framework-ci/103/rebuild

review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Thanks Michi!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/qt/client/internal/local_client/DownloaderImpl.cpp'
2--- src/qt/client/internal/local_client/DownloaderImpl.cpp 2016-08-25 23:56:02 +0000
3+++ src/qt/client/internal/local_client/DownloaderImpl.cpp 2016-09-01 03:12:17 +0000
4@@ -258,7 +258,7 @@
5
6 DownloaderImpl::DownloaderImpl(weak_ptr<File> file)
7 : DownloaderBase(file)
8- , read_socket_(new QLocalSocket)
9+ , read_socket_(new QLocalSocket, [](QLocalSocket* s){ s->deleteLater(); })
10 {
11 // Set up socket pair.
12 int fds[2];
13
14=== modified file 'src/qt/client/internal/local_client/UploaderImpl.cpp'
15--- src/qt/client/internal/local_client/UploaderImpl.cpp 2016-08-25 23:56:02 +0000
16+++ src/qt/client/internal/local_client/UploaderImpl.cpp 2016-09-01 03:12:17 +0000
17@@ -356,7 +356,7 @@
18 ConflictPolicy policy,
19 weak_ptr<Root> root)
20 : UploaderBase(policy, size)
21- , write_socket_(new QLocalSocket)
22+ , write_socket_(new QLocalSocket, [](QLocalSocket* s){ s->deleteLater(); })
23 {
24 // Set up socket pair.
25 int fds[2];
26
27=== modified file 'src/qt/client/internal/remote_client/DownloaderImpl.cpp'
28--- src/qt/client/internal/remote_client/DownloaderImpl.cpp 2016-08-26 02:51:11 +0000
29+++ src/qt/client/internal/remote_client/DownloaderImpl.cpp 2016-09-01 03:12:17 +0000
30@@ -52,7 +52,7 @@
31 , fd_(fd)
32 , file_(file)
33 , provider_(provider)
34- , read_socket_(new QLocalSocket)
35+ , read_socket_(new QLocalSocket, [](QLocalSocket* s){ s->deleteLater(); })
36 {
37 assert(!download_id.isEmpty());
38 assert(fd.isValid());
39
40=== modified file 'src/qt/client/internal/remote_client/UploaderImpl.cpp'
41--- src/qt/client/internal/remote_client/UploaderImpl.cpp 2016-08-26 02:51:11 +0000
42+++ src/qt/client/internal/remote_client/UploaderImpl.cpp 2016-09-01 03:12:17 +0000
43@@ -53,7 +53,7 @@
44 , old_etag_(old_etag)
45 , root_(root.lock())
46 , provider_(provider)
47- , write_socket_(new QLocalSocket)
48+ , write_socket_(new QLocalSocket, [](QLocalSocket* s){ s->deleteLater(); })
49 , state_(uploading)
50 {
51 assert(!upload_id.isEmpty());

Subscribers

People subscribed via source and target branches

to all changes: