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

DotNetty.Buffers IndexOutOfBoundsException on ChannelGroup.WriteAndFlushAsync(Unpooled.Empty) #55

Closed
Aaronontheweb opened this issue Nov 25, 2015 · 1 comment
Assignees

Comments

@Aaronontheweb
Copy link
Contributor

Haven't determined what the underlying cause of the error is yet, but the following block of code throws an IndexOutOfBoundsException inside the Task returned on ChannelGroup.WriteAndFlushAsync

public override async Task<bool> Shutdown()
{
    Func<Task, bool> always = task => task.IsCompleted & !task.IsCanceled & !task.IsFaulted;

    var writeStatus = ChannelGroup.WriteAndFlushAsync(Unpooled.Empty).ContinueWith(always); //throws inside Task
    var disconnectStatus = ChannelGroup.DisconnectAsync().ContinueWith(always);
    var closeStatus = ChannelGroup.CloseAsync().ContinueWith(always);
    //_eventListener.Dispose();
    return await Task.WhenAll(writeStatus, disconnectStatus, closeStatus).ContinueWith(tr =>
    {
        if (tr.IsFaulted || tr.IsCanceled) return false;
        return tr.Result.All(x => x);
    });
}
@Aaronontheweb
Copy link
Contributor Author

Stacktrace:

   at DotNetty.Buffers.EmptyByteBuffer.Duplicate()
   at DotNetty.Transport.Channels.Groups.DefaultChannelGroup.SafeDuplicate(Object message)
   at DotNetty.Transport.Channels.Groups.DefaultChannelGroup.WriteAndFlushAsync(Object message, IChannelMatcher matcher)
   at DotNetty.Transport.Channels.Groups.DefaultChannelGroup.WriteAndFlushAsync(Object message)
   at Akka.Remote.Transport.DotNetty.DotNettyTransport.<Shutdown>d__36.MoveNext() in D:\Repositories\olympus\akka.net\src\core\Akka.Remote\Transport\DotNetty\DotNettyTransport.cs:line 532

@nayato nayato self-assigned this Nov 25, 2015
@Aaronontheweb Aaronontheweb mentioned this issue Dec 1, 2015
@nayato nayato closed this as completed in 7ccec95 Dec 5, 2015
nayato added a commit that referenced this issue Dec 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants