| 910 | out->send(true); |
| 911 | SLEEP_MS(DESTRUCT_WAIT); |
| 912 | } |
| 913 | } |
| 914 | } |
| 915 | |
| 916 | // Clean up VoN speakers |
| 917 | for (auto& [ch, spk] : _vonSpeakers) |
| 918 | { |
| 919 | if (spk) |
| 920 | spk->destroy(); |
| 921 | } |
| 922 | _vonSpeakers.clear(); |
| 923 | _vonSystem.shutdown(); |
| 924 | |
| 925 | setClient(nullptr); |
| 926 | // recycle all pending NetMessages: |
| 927 | RemoveUserMessages(); |
| 928 | RemoveSendComplete(); |
| 929 | // destroy the NetChannel: |
| 930 | #ifdef NET_LOG_CLIENT |
| 931 | #ifdef NET_LOG_BRIEF |
| 932 | NetLog("Ch(%u):~cli", channel ? channel->getChannelId() : 0); |
| 933 | #else |
| 934 | NetLog("Channel(%u): destroying NetClient instance", channel ? channel->getChannelId() : 0); |
| 935 | #endif |
| 936 | #endif |
| 937 | if (channel) |
| 938 | { |
| 939 | NetChannel* old = channel; |
| 940 | channel = nullptr; |
| 941 | leaveSnd(); |
no test coverage detected