QTcpServer already has a list of pending connections and emits newConnection after calling incomingConnection
ClosedPublic

Authored by eduisters on Nov 19 2018, 11:13 AM.

Details

Summary

No need to emit newConnection in Server::incomingConnection because QTcpServer will emit it after incomingConnection returns
QTcpServer also already has a list of pending connections so use that

Test Plan

Send a file from desktop to android and observe that newConnection is only called once

Diff Detail

Repository
R224 KDE Connect
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
eduisters created this revision.Nov 19 2018, 11:13 AM
Restricted Application added a project: KDE Connect. · View Herald TranscriptNov 19 2018, 11:13 AM
Restricted Application added a subscriber: kdeconnect. · View Herald Transcript
eduisters requested review of this revision.Nov 19 2018, 11:13 AM
albertvaka accepted this revision.Nov 19 2018, 11:34 AM
This revision is now accepted and ready to land.Nov 19 2018, 11:34 AM
This revision was automatically updated to reflect the committed changes.