Skip to content

Unhandled exception when socket connection is timed out #80

@so1dier

Description

@so1dier

When a connection is not successful, there is an unhandled exception that crashes the whole program

Here is a output log message:

Unhandled exception. Microsoft.Azure.ServiceBus.ServiceBusCommunicationException: Operation timed out ErrorCode: TimedOut
 ---> System.Net.Sockets.SocketException (60): Operation timed out
   at Microsoft.Azure.ServiceBus.ServiceBusConnection.CreateConnectionAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Amqp.AmqpLinkCreator.CreateAndOpenAmqpLinkAsync()
   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.CreateRequestResponseLinkAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.FaultTolerantAmqpObject`1.OnCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.Amqp.Singleton`1.GetOrCreateAsync(TimeSpan timeout)
   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.ExecuteRequestResponseAsync(AmqpRequestMessage amqpRequestMessage)
   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.OnPeekAsync(Int64 fromSequenceNumber, Int32 messageCount)
   --- End of inner exception stack trace ---
   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.OnPeekAsync(Int64 fromSequenceNumber, Int32 messageCount)
   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.<>c__DisplayClass79_0.<<PeekBySequenceNumberAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func`1 operation, TimeSpan operationTimeout)
   at Microsoft.Azure.ServiceBus.Core.MessageReceiver.PeekBySequenceNumberAsync(Int64 fromSequenceNumber, Int32 messageCount)
   at PurpleExplorer.Helpers.QueueHelper.GetMessages(ServiceBusConnectionString connectionString, String queueName)
   at PurpleExplorer.ViewModels.MainWindowViewModel.FetchQueueMessages()
   at PurpleExplorer.ViewModels.MainWindowViewModel.FetchMessages()
   at PurpleExplorer.Views.MainWindow.TreeView_SelectionChanged(Object sender, SelectionChangedEventArgs e)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 37
   at Avalonia.Native.PlatformThreadingInterface.SignaledCallback.Signaled(Int32 priority, Int32 priorityContainsMeaningfulValue) in /_/src/Avalonia.Native/PlatformThreadingInterface.cs:line 39
   at Avalonia.Native.Interop.Impl.__MicroComIAvnSignaledCallbackVTable.Signaled(Void* this, Int32 priority, Int32 priorityContainsMeaningfulValue) in /_/src/Avalonia.Native/Interop.Generated.cs:line 4336
--- End of stack trace from previous location ---
   at Avalonia.Native.PlatformThreadingInterface.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Native/PlatformThreadingInterface.cs:line 90
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 65
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 120
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime[T](T builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 209
   at PurpleExplorer.Program.Main(String[] args)
zsh: abort      sudo ./PurpleExplorer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions