Skip to content
This repository has been archived by the owner on Dec 9, 2023. It is now read-only.

Are these lines still required in .net standard? #39

Open
Inrego opened this issue Mar 11, 2018 · 4 comments
Open

Are these lines still required in .net standard? #39

Inrego opened this issue Mar 11, 2018 · 4 comments

Comments

@Inrego
Copy link
Contributor

Inrego commented Mar 11, 2018

var sp = request.ServicePoint;
if (_httpBehaviorPropertyInfo == null)
{
_httpBehaviorPropertyInfo = sp.GetType().GetProperty("HttpBehaviour", BindingFlags.Instance | BindingFlags.NonPublic);
}
_httpBehaviorPropertyInfo.SetValue(sp, (byte)0, null);

For me, these lines are causing exceptions now that I am using .NET Standard 2.0
I guess the hack doesn't work anymore with the new target. Could we possibly remove them, or implement another workaround if they are still required?

@Inrego
Copy link
Contributor Author

Inrego commented Mar 11, 2018

On a side note, I have for a while been using a custom local build where I comment out line 27 and 32, and it has been working fine so far. However, I am not using sockets - and I have not yet had any long sessions. So it may not have been tested properly in the right use cases.

@LukePulverenti
Copy link
Member

I think they can probably be removed at this point.

@Inrego
Copy link
Contributor Author

Inrego commented Mar 11, 2018

Sounds nice. Can you do it, and put up a new NuGet? Or do you want a PR?

@Inrego
Copy link
Contributor Author

Inrego commented Mar 17, 2018

Could I ask you to upload a new NuGet with the new version, please? 😃 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants