diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-12-14 00:06:34 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-12-14 00:06:34 +0100 |
commit | 971603e92c856df8aed4b6d788d0a96485e4eccd (patch) | |
tree | 710561f620900e920d709ba8ee1a0690427b2c55 /ftnoir_tracker_udp | |
parent | b99efdf3196bb7687dd4ad8f188d9e2ec12f0683 (diff) |
bind socket on worker thread for thread ownership
Diffstat (limited to 'ftnoir_tracker_udp')
-rw-r--r-- | ftnoir_tracker_udp/ftnoir_tracker_udp.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp index 507543be..c900fb67 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp @@ -12,6 +12,7 @@ FTNoIR_Tracker::~FTNoIR_Tracker() void FTNoIR_Tracker::run() { QByteArray datagram; datagram.resize(sizeof(last_recv_pose)); + (void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); for (;;) { if (should_quit) break; @@ -25,7 +26,6 @@ void FTNoIR_Tracker::run() { void FTNoIR_Tracker::start_tracker(QFrame*) { - (void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); start(); } |