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

ObjectDisposedException during network error #45

Closed
judwhite opened this issue May 21, 2016 · 1 comment · Fixed by #60
Closed

ObjectDisposedException during network error #45

judwhite opened this issue May 21, 2016 · 1 comment · Fixed by #60
Assignees

Comments

@judwhite
Copy link
Owner

judwhite commented May 21, 2016

[2016-05-14 09:20:00.7733] [Error] C7 IO error - System.ArgumentException: length of response is too small
Parameter name: response
at NsqSharp.Core.Protocol.UnpackResponse(Byte[] response, FrameType& frameType, Byte[]& body) in d:\Projects_github\NsqSharp\NsqSharp\Core\Protocol.cs:line 104
at NsqSharp.Core.Conn.readLoop() in d:\Projects_github\NsqSharp\NsqSharp\Core\Conn.cs:line 554

[2016-05-14 09:20:09.9268] [Error] C7 IO error - System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at NsqSharp.Utils.TcpConn.Write(Byte[] b, Int32 offset, Int32 length) in d:\Projects_github\NsqSharp\NsqSharp\Utils\TcpConn.cs:line 127
at NsqSharp.Core.Command.WriteTo(IWriter w, Byte[] buf) in d:\Projects_github\NsqSharp\NsqSharp\Core\Command.cs:line 164
at NsqSharp.Core.Conn.WriteCommand(Command cmd) in d:\Projects_github\NsqSharp\NsqSharp\Core\Conn.cs:line 344

[2016-05-14 09:20:09.9268] [Error] C7
error sending CLS - System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at NsqSharp.Utils.TcpConn.Write(Byte[] b, Int32 offset, Int32 length) in d:\Projects_github\NsqSharp\NsqSharp\Utils\TcpConn.cs:line 127
at NsqSharp.Core.Command.WriteTo(IWriter w, Byte[] buf) in d:\Projects_github\NsqSharp\NsqSharp\Core\Command.cs:line 164
at NsqSharp.Core.Conn.WriteCommand(Command cmd) in d:\Projects_github\NsqSharp\NsqSharp\Core\Conn.cs:line 351
at NsqSharp.Consumer.StopAsync() in d:\Projects_github\NsqSharp\NsqSharp\Consumer.cs:line 1528

[2016-08-12 16:12:38.6065] [Error] C12 error sending command REQ 0a8fa0dcac598001 90000 - System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 size)
at NsqSharp.Utils.TcpConn.Write(Byte[] b, Int32 offset, Int32 length) in d:\Projects_github\NsqSharp\NsqSharp\Utils\TcpConn.cs:line 127
at NsqSharp.Core.Command.WriteTo(IWriter w, Byte[] buf) in d:\Projects_github\NsqSharp\NsqSharp\Core\Command.cs:line 164
at NsqSharp.Core.Conn.WriteCommand(Command cmd) in d:\Projects_github\NsqSharp\NsqSharp\Core\Conn.cs:line 351
at NsqSharp.Core.Conn.<writeLoop>b__2(msgResponse resp) in d:\Projects_github\NsqSharp\NsqSharp\Core\Conn.cs:line 705

@judwhite judwhite added the bug label May 21, 2016
@judwhite judwhite self-assigned this May 21, 2016
@judwhite
Copy link
Owner Author

judwhite commented Aug 1, 2016

Most likely caused by a call to Write after Close

judwhite added a commit that referenced this issue Aug 20, 2016
- throws on TcpConn Read/Write/Flush when connection closed
- previously would throw an ObjectDisposed exception
- if ConnectionClosedException occurs while trying to send CLS to
  nsqd, ignore the error
- relates to #45
judwhite added a commit that referenced this issue Aug 20, 2016
judwhite added a commit that referenced this issue Aug 20, 2016
@judwhite judwhite added the fixed label Sep 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant