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

Figure out issue with zero byte reads in muxer #24

Open
agaffney opened this issue Feb 26, 2022 · 1 comment
Open

Figure out issue with zero byte reads in muxer #24

agaffney opened this issue Feb 26, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@agaffney
Copy link
Contributor

I'll occasionally run into an error accessing index 0 in an array when the remote host closes the connection unexpectedly (usually in response to a "bad" message sent to them). There should be some additional error checking around this to detect the zero byte read (that we still try to decode as CBOR) to give a more useful error.

@agaffney
Copy link
Contributor Author

panic: runtime error: index out of range [0] with length 0

goroutine 24 [running]:
github.com/cloudstruct/go-ouroboros-network/protocol.(*Protocol).recvLoop(0xc0000e4090)
        /home/agaffney/dev/cloudstruct/go-ouroboros-network/protocol/protocol.go:101 +0x545
created by github.com/cloudstruct/go-ouroboros-network/protocol.New
        /home/agaffney/dev/cloudstruct/go-ouroboros-network/protocol/protocol.go:46 +0x17b

@wolf31o2 wolf31o2 added the bug Something isn't working label Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants