davidfowl / BedrockFramework

High performance, low level networking APIs for building custom servers and clients.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Server Start-Stop "restart" exception

tothalexlaszlo opened this issue · comments

Scenario:

  1. Start server
  2. Stop server
  3. Start server
  4. Stop server <- at this point a TimerAwaitable is already disposed in the server component
    If we remove readonly keyword from _timerAwaitable and move its initialization from ctor to StartAsync() we could start-stop the server as many times as we want without throwing any exception.

Shall I PR it or it is intentionally done?

Yes please, send the fix.