| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
When creating a listening socket using the following call:
socketRef = CFSocketCreateWithSocketSignature(NULL, &signature, kCFSocketAcceptCallBack, MCFSocketCallback, &socketContext);
if (socketRef != NULL)
{
}
But the bind fails because another process is currently using the port, the file handle seems to be leaked.
The returned socketRef is NULL, so I can't call CFSocketinvalidate to clean it up, but lsof shows:
CSPRelay 11408 mlaster 16u inet 0x039cfd1c 0t0 TCP *:* (CLOSED)
CSPRelay 11408 mlaster 17u inet 0x03887d1c 0t0 TCP *:5678 (LISTEN)
The 16u handle was from a failed attempt, and the 17u handle was from the second time I called it after freeing up port 5678.
Is this a bug in CoreFoundation, or is there something I need to do to get rid of sockets that failed to bind?
| References: | |
| >CoreFoundation socket leak? (From: Mike Laster <email@hidden>) |
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2007 Apple Inc. All rights reserved.