Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4524

.NET Core Server doesn't close properly when cancelled

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: netcore - Library
    • Labels:
      None
    • Environment:

      Windows 10 Surface Pro 4. Xamarin.Forms app.  .NET Standard 2.0 libraries.

      Description

      My code starts a server with a cancellation token and then later stops it by triggering the token.  When it does, the server fails to close cleanly and my code cannot then start another server on the same port.  The problem is that the Task which is responsible for opening and closing the connection in AsyncBaseServer throws a TokenCancelationException in the Task.Delay call which is not caught and therefore bombs out the task without closing the socket.  I will raise a pull request with a fix.

        Attachments

          Activity

            People

            • Assignee:
              jking3 James E. King III
              Reporter:
              stephen.starkie@me.com Stephen Starkie

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 12h
                12h
                Remaining:
                Remaining Estimate - 12h
                12h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Issue deployment