CAsyncSocket::Close() assertion failure. 
Author Message
 CAsyncSocket::Close() assertion failure.


Every call to Close() of CAsyncSocket object causes assertion failure.  The
debug info points to DoCallBack() method in sockcore.cpp (I'm not sure if I
can trust it, though).  I had the nonblocking mode disabled  and no events
were requested in socket Create().
The following code sample illustrates the problem.

  // ...
  m_pSocket = new CAsyncSocket();
  if (!m_pSocket->Create(0, SOCK_STREAM)) {
    // ...
  DWORD dwNB = 0;            
  if (!m_pSocket->IOCtl(FIONBIO, &dwNB)) {   // disable nonblocking mode
  if (!m_pSocket->Connect(m_lpszAddress, m_nPort)) {

  m_pSocket->Close();           // <= this causes assertion failure

I would appreciate _any_ suggestions on what could be causing the failure.


Sat, 05 Jun 1999 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. CAsyncSocket: debug assertion failure, line 512 in sockcore.cpp

2. CAsyncSocket::Create() in thread causes assertion failure

3. PLEASE HELP: Assertion failure with CAsyncSocket (Sockcore.cpp line 483)

4. CAsyncSocket - assertion failure

5. Close CAsyncSocket in a thread causes an assertion

6. isspace in debug-version produces assertion-failure

7. Why does this function cause an assertion failure?

8. Assertion failure using CDatabase in a windowless ActiveX control

9. Assertion failure in atlcom.h line 3552

10. DAO Assertion failures in VC++4.2

11. ASSERTION Failures in Composite Active X Control

12. Debug assertion failure when deleting a CWindowImpl


Powered by phpBB® Forum Software