Hi,
I now have an issue with normal process shutdown.
Everything works fine until I want to shutdown the host process for the remote data adapter. The process is hosted in a console application which "main" method exists but the process keeps running. Obviously there must be a non-background thread which prevents process exit.
I've then attached the VS debugger to the process and found an unnamed thread with this call stack:
[Managed to Native Transition]
> System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer = {Dimensions :Smile_Ah: 1024]}, int offset = 0, int size, System.Net.Sockets.SocketFlags socketFlags = None, out System.Net.Sockets.SocketError errorCode = Success) + 0xd3 bytes
System.dll!System.Net.Sockets.Socket.Receive(byte[] buffer, int offset, int size, System.Net.Sockets.SocketFlags socketFlags) + 0x21 bytes
System.dll!System.Net.Sockets.NetworkStream.Read(byte[] buffer, int offset, int size) + 0x78 bytes
mscorlib.dll!System.IO.StreamReader.ReadBuffer() + 0x5c bytes
mscorlib.dll!System.IO.StreamReader.ReadLine() + 0x1f bytes
DotNetAdapter_N2.dll!Lightstreamer.DotNet.Server.RequestReply.RequestReceiver.Run() + 0x40 bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart_Context(object state) + 0x3b bytes
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x81 bytes
mscorlib.dll!System.Threading.ThreadHelper.ThreadStart() + 0x40 bytes
The thread is apparently blocked on the Socket.Receive() method.
Here is how the server gets started:
server.RequestStream = _rrSocket.GetStream();
server.ReplyStream = _rrSocket.GetStream();
if (_notifSocket != null)
{
server.NotifyStream = _notifSocket.GetStream();
}
OnConnected(EventArgs.Empty);
server.Start();
On the process exit the server gets closed with the Close() method which results in the following log output:
2008-10-15 12:20:21,283 [9] INFO Lightstreamer.DotNet.Server.RequestReply.NotifySender [(null)] - Reply sender '#1' stopped
2008-10-15 12:20:21,283 [8]INFO Lightstreamer.DotNet.Server.RequestReply.NotifySender [(null)] - Notify sender '#1' stopped
Do I have to do something else/different?
Thanks.