Retry feature added for exceptions while listening client connections #137
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When there is an exception while accepting connections WebSocketServer was immediately stopping listening for new client connections. Retry feature added.
An example exception stack trace in a production environment is as follows;
Listener socket is closed Fleck Exception: Mesaj: One or more errors occurred.Stack Trace: Inner Exception Mesaj: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.Inner Exception Stack Trace: at System.Net.Sockets.NetworkStream.BeginRead(Byte[] buffer, Int32 offset, Int32 size, AsyncCallback callback, Object state) at System.Net.FixedSizeReader.StartReading() at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest) at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult) at System.Net.Security.SslStream.BeginAuthenticateAsServer(X509Certificate serverCertificate, Boolean clientCertificateRequired, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation, AsyncCallback asyncCallback, Object asyncState) at Fleck.SocketWrapper.<>c__DisplayClass4.b__0(AsyncCallback cb, Object s) at System.Threading.Tasks.TaskFactory
1.FromAsyncImpl(Func
3 beginMethod, Func2 endFunction, Action
1 endAction, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory.FromAsync(Func3 beginMethod, Action
1 endMethod, Object state, TaskCreationOptions creationOptions) at System.Threading.Tasks.TaskFactory.FromAsync(Func3 beginMethod, Action
1 endMethod, Object state) at Fleck.SocketWrapper.Authenticate(X509Certificate2 certificate, Action callback, Action1 error)<rn> at Fleck.WebSocketServer.OnClientConnect(ISocket clientSocket)<rn> at Fleck.SocketWrapper.<>c__DisplayClass14.<Accept>b__12(Task
1 t) at System.Threading.Tasks.Task.Execute()