理想状态:
1:
先执行servier1(非正常),ssl_connect错误;
然后执行server2(正常),ssl_connect正确;
2:
先执行servier2(正常),ssl_connect正常
现在情况:
1:
先执行servier1(非正常),ssl_connect错误;
然后执行server2(正常),ssl_connect错误;但是手动单步执行,正确!
2:
先执行servier2(正常),ssl_connect正常
=============================
{
创建socket()
connect()
myssl = SSL_new(myctx);
SSL_set_fd(myssl, mysock);
SSL_connect()
}
有谁知道,可能什么原因?
8 个解决方案
#1
WSAEALREADY
10037
Operation already in progress.
An operation was attempted on a nonblocking socket with an operation already in progress—that is, calling connect a second time on a nonblocking socket that is already connecting, or canceling an asynchronous request (WSAAsyncGetXbyY) that has already been canceled or completed.
我查了一下,是这个错误,请问如何避免,怎么造成的,谢谢
10037
Operation already in progress.
An operation was attempted on a nonblocking socket with an operation already in progress—that is, calling connect a second time on a nonblocking socket that is already connecting, or canceling an asynchronous request (WSAAsyncGetXbyY) that has already been canceled or completed.
我查了一下,是这个错误,请问如何避免,怎么造成的,谢谢
#2
1楼回复的大家忽略掉!
#3
单步调试执行,都没有问题!
#4
你是用openssl吧,openssl握手建立之前的套接字,不能为异步IO模式!
#5
不太懂啊,ls能否讲清楚一点
#6
你只需要记住,这是openssl的硬性规定
你提供给openssl的套接字,不能是非阻塞型的套接字
你提供给openssl的套接字,不能是非阻塞型的套接字
#7
楼主啊,你不结贴,不给任何反应,该当何罪
#8
我给的是非阻塞型socket,在connect之后,改成阻塞型,SSL_connect之后,改成非阻塞型。
我遇到的问题是,两个socket同时进行SSL_connect时,先进入的能成功,后进入的会失败,错误提示wrong version number。如果是关闭一个socket,再开启另一个,不会有这个问题。
我遇到的问题是,两个socket同时进行SSL_connect时,先进入的能成功,后进入的会失败,错误提示wrong version number。如果是关闭一个socket,再开启另一个,不会有这个问题。
#1
WSAEALREADY
10037
Operation already in progress.
An operation was attempted on a nonblocking socket with an operation already in progress—that is, calling connect a second time on a nonblocking socket that is already connecting, or canceling an asynchronous request (WSAAsyncGetXbyY) that has already been canceled or completed.
我查了一下,是这个错误,请问如何避免,怎么造成的,谢谢
10037
Operation already in progress.
An operation was attempted on a nonblocking socket with an operation already in progress—that is, calling connect a second time on a nonblocking socket that is already connecting, or canceling an asynchronous request (WSAAsyncGetXbyY) that has already been canceled or completed.
我查了一下,是这个错误,请问如何避免,怎么造成的,谢谢
#2
1楼回复的大家忽略掉!
#3
单步调试执行,都没有问题!
#4
你是用openssl吧,openssl握手建立之前的套接字,不能为异步IO模式!
#5
不太懂啊,ls能否讲清楚一点
#6
你只需要记住,这是openssl的硬性规定
你提供给openssl的套接字,不能是非阻塞型的套接字
你提供给openssl的套接字,不能是非阻塞型的套接字
#7
楼主啊,你不结贴,不给任何反应,该当何罪
#8
我给的是非阻塞型socket,在connect之后,改成阻塞型,SSL_connect之后,改成非阻塞型。
我遇到的问题是,两个socket同时进行SSL_connect时,先进入的能成功,后进入的会失败,错误提示wrong version number。如果是关闭一个socket,再开启另一个,不会有这个问题。
我遇到的问题是,两个socket同时进行SSL_connect时,先进入的能成功,后进入的会失败,错误提示wrong version number。如果是关闭一个socket,再开启另一个,不会有这个问题。