Hi,
I've come across an intermittent issue while using the Microsoft stack and the WCL bluetooth library. The issue is that the Close() method on the CwclServer class hangs. I have not been able to work out the specific situation when this happens, but have included a stack trace of where it hangs, which is always identical.
The general conditions
The app establishes a connection outwards using CwclClient, sends and receives some data, calls Disconnect(), then sets up the CwclServer class to listen for incoming connections. The previously connected device connects back to the app, lots of data is sent and received, then the app calls Close() to end the connection, at which point Close() never returns.
The OnClosed and OnDisconnected hooks have not fired, and the Server state is ssConnected.
Am I using the library correctly? Are there situations in which Close should not be called? Any help would be much appreciated.
version is 6.12.10.0 (also on 6.12.9.0)
Thanks very much
David
stack trace (main thread)
CwclCustomConnection::StopThread() line 138
CwclCustomServerConnection::CloseWinSock() line 221
CwclCustomServerConnection::CloseMicrosoft() line 177
CwclCustomServerConnection::CloseBluetooth() line 154
CwclCustomServerConnection::Close() line 117
in another thread:
user32.dll!_NtUserMessageCall@28()
user32.dll!_SendMessageWorker@24()
user32.dll!_SendMessageW@16()
CwclCustomServerConnection::WinSockThread() line 1328
CwclCustomServerConnection::_WinSockThread line 1348
when it is hung, it never gets past WinSockThread() line 1328