Esempio n. 1
0
 private static async void ExecuteCallback(UvTcpListener listener, UvTcpConnection connection)
 {
     try
     {
         await listener._callback?.Invoke(connection);
     }
     catch
     {
         // Swallow exceptions
     }
     finally
     {
         // Dispose the connection on task completion
         connection.Dispose();
     }
 }
Esempio n. 2
0
        private static async void ExecuteCallback(UvTcpListener listener, UvTcpConnection connection)
        {
            try
            {
                await listener._callback?.Invoke(connection);

                // Make sure we dispose off the libuv thread
                await Task.Yield();
            }
            catch
            {
                // Swallow exceptions
            }
            finally
            {
                // Dispose the connection on task completion
                connection.Dispose();
            }
        }
Esempio n. 3
0
 private static async void ExecuteCallback(UvTcpListener listener, UvTcpConnection connection)
 {
     try
     {
         await listener._callback?.Invoke(connection);
     }
     catch
     {
         // Swallow exceptions
     }
     finally
     {
         // Dispose the connection on task completion
         connection.Dispose();
     }
 }