News  [SoftwareSite

Latest News
Older News
RSS Feed
Complete Projects
Useful Classes
Top Downloads
Message Board
Send Comments
Software License Buttons
Forums -> Security Library Forum
Deadlocks using SecureSocket  
by John Doty
posted on 2003/08/17

A client using a SecureSocket can get itself into a deadlock quite easily if it does a synchronous send from the callback of an asynchronous receive.

That is if you do something like:

SecureSocket ss = ...;
void SetupReceive()

void ReceiveCallback(IAsyncResult result)
ss.Send(new byte[] {...});

then the Send() will deadlock and never complete. The reason for this is that the ReceiveCallback is called from SocketController.OnReceive (via ProcessDecryptedBytes) while holding the lock on the SocketController. Thus, when EndSend() tries to take the lock to complete the send, it cannot.

Is this going to be fixed soon?

by Pieter Philippaerts [Pieter at mentalis dot org]
posted on 2003/08/17

Thanks, we've uploaded a new version of the library that fixes this deadlock problem. You can download it from


Copyright © 2002-2007, The Team. All rights reserved.
This site is located at
Send comments to the webmaster.