Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Socket.Close calls Socket.Dispose internally #1968

merged 1 commit into from Sep 6, 2018


Copy link

commented Aug 17, 2018

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly

  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])

  • Use Preview tab to see how your pull request will actually look like

  • Searched for similar pull requests

  • Compiled the code with Visual Studio

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New feature

Description of your pull request and other information

Removed redundant method call.

Explanation of your pull request in arbitrary form goes here. Please make sure the description explains the purpose and effect of your pull request and is worded well enough to be understood. Provide as much context and examples as possible.

Removed redundant method call

This comment has been minimized.

Copy link

commented Sep 3, 2018

What if it failed to Close the socket at the beginning then try to Dispose it again? There is no socket.IsDisposing or socket.Disposed to use.


This comment has been minimized.

Copy link
Contributor Author

commented Sep 6, 2018

    public void Close()
      if (Socket.s_LoggingEnabled)
        Logging.Enter(Logging.Sockets, (object) this, "Close", (string) null);
      if (!Socket.s_LoggingEnabled)
      Logging.Exit(Logging.Sockets, (object) this, "Close", (string) null);

This is what the call looks like internally. All is fine with my pull request.

@celeron533 celeron533 merged commit f1042cb into shadowsocks:master Sep 6, 2018
1 check passed
1 check passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.