Skip to content

StopAsync immediately after StartAsync fails #75

@twodogmbh

Description

@twodogmbh

When on the FTP server the method StopAsync is called immediately after StartAsync, the method fails with the following exception:

---> (Inner Exception #0) System.InvalidOperationException: Status must be Running, Stopped, or Paused, but was ReadyToRun.
   at FubarDev.FtpServer.Networking.PausableFtpService.<StopAsync>d__19.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable.ConfiguredTaskAwaiter.GetResult()
   at FubarDev.FtpServer.FtpServer.<StopAsync>d__36.MoveNext()<---

In my opinion, it should also be possible to stop the FTP server in state "ReadyToRun".

The same issue occurs also when calling PauseAsync immediately after StartAsync.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions