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

c#demo中SSLHttpServer.cs第二次开始服务出错 #37

Closed
jiongge opened this issue Jan 19, 2018 · 2 comments
Closed

c#demo中SSLHttpServer.cs第二次开始服务出错 #37

jiongge opened this issue Jan 19, 2018 · 2 comments

Comments

@jiongge
Copy link

jiongge commented Jan 19, 2018

SSLHttpServer创建时调用了一次Interlocked.Increment(ref ObjectReferer);
可是每次Uninitialize的时候都调用了 if (Interlocked.Decrement(ref ObjectReferer) == 0 && pServer != IntPtr.Zero)
而每次开始服务的时候都会调用Uninitialize,这样就导致Interlocked.Decrement(ref ObjectReferer) == 0返回false,从而不能调用SSLSdk.HP_SSLServer_CleanupSSLContext(pServer);
再次开始服务时候Initialize服务返回false

@sankeyou
Copy link

sankeyou commented Feb 23, 2018

最新版本已更新
现在需要手动调用Initialize()和 Uninitialize()方法,具体请查看demo

@ldcsaa
Copy link
Owner

ldcsaa commented Feb 24, 2018

最新版本代码:https://gitee.com/int2e/HPSocketCS
下次发布将纳入。

@ldcsaa ldcsaa closed this as completed Mar 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants