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

SAEA模式大批量重复下载问题求助! #15

Open
owen157 opened this issue Aug 15, 2018 · 0 comments
Open

SAEA模式大批量重复下载问题求助! #15

owen157 opened this issue Aug 15, 2018 · 0 comments

Comments

@owen157
Copy link

owen157 commented Aug 15, 2018

大神,您好,我用TAP方式实现了一个项目,非常稳定,不甚感激 。目前我用SAEA模式做一个大批量下载小文件的工具,在大量下载时有时会报错如下(具体的实现是在client端读取一个文件列表200个左右, TcpSocketSaeaClient _client = new TcpSocketSaeaClient(remoteEP, new SimpleEventDispatcher(), config);
_client.Connect().Wait();

Task.Run(async () =>
{
await _client.SendAsync(Encoding.UTF8.GetBytes(item.Name));
});

System.Threading.Thread.Sleep(100);
_client.Shutdown();
从server下载)
报错如下,请看看如何解决, 感激!
Inner Exception Details:

Exception Type: System.NullReferenceException
Message: 未将对象引用设置到对象的实例。
TargetSite: Boolean ReceiveAsync(System.Net.Sockets.SocketAsyncEventArgs)
HelpLink: NULL
Source: System

Inner Exception StackTrace:

在 System.Net.Sockets.Socket.ReceiveAsync(SocketAsyncEventArgs e)
在 Cowboy.Sockets.SaeaExtensions.<>c.<.cctor>b__11_3(Socket s, SaeaAwaitable a) 位置 D:\yang\FIB\Cowboy-master_ORIG\Cowboy-master\Cowboy\Cowboy.Sockets\Tcp\Server\EAP\Awaitable\SaeaExtensions.cs:行号 12
在 Cowboy.Sockets.SaeaExtensions.OperateAsync(Socket socket, SaeaAwaitable awaitable, Func`3 operation) 位置 D:\yang\FIB\Cowboy-master_ORIG\Cowboy-master\Cowboy\Cowboy.Sockets\Tcp\Server\EAP\Awaitable\SaeaExtensions.cs:行号 76
在 Cowboy.Sockets.SaeaExtensions.ReceiveAsync(Socket socket, SaeaAwaitable awaitable) 位置 D:\yang\FIB\Cowboy-master_ORIG\Cowboy-master\Cowboy\Cowboy.Sockets\Tcp\Server\EAP\Awaitable\SaeaExtensions.cs:行号 32
在 Cowboy.Sockets.TcpSocketSaeaSession.d__42.MoveNext() 位置 D:\yang\FIB\Cowboy-master_ORIG\Cowboy-master\Cowboy\Cowboy.Sockets\Tcp\Server\EAP\TcpSocketSaeaSession.cs:行号 239

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

1 participant