Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
af828836
Commit
af828836
authored
May 30, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1620 from dogmaphobic/udpFix
Move the socket close to the proper thread.
parents
2306566c
66c712e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
UDPLink.cc
src/comm/UDPLink.cc
+9
-2
No files found.
src/comm/UDPLink.cc
View file @
af828836
...
...
@@ -107,6 +107,9 @@ void UDPLink::run()
{
_hardwareConnect
();
exec
();
if
(
_socket
)
{
_socket
->
close
();
}
}
void
UDPLink
::
_restartConnection
()
...
...
@@ -225,7 +228,6 @@ bool UDPLink::_disconnect(void)
this
->
wait
();
if
(
_socket
)
{
// Make sure delete happen on correct thread
_socket
->
close
();
_socket
->
deleteLater
();
_socket
=
NULL
;
emit
disconnected
();
...
...
@@ -249,12 +251,17 @@ bool UDPLink::_connect(void)
}
// TODO When would this ever return false?
bool
connected
=
true
;
start
(
HighPriority
);
// I see no reason to run this in "HighPriority"
start
(
NormalPriority
);
return
connected
;
}
bool
UDPLink
::
_hardwareConnect
()
{
if
(
_socket
)
{
delete
_socket
;
_socket
=
NULL
;
}
QHostAddress
host
=
QHostAddress
::
Any
;
_socket
=
new
QUdpSocket
();
_socket
->
setProxy
(
QNetworkProxy
::
NoProxy
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment