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

fix(305)Panic when receive bad packet #308

Merged
merged 3 commits into from
Mar 5, 2020
Merged

Conversation

lzh2nix
Copy link
Contributor

@lzh2nix lzh2nix commented Mar 5, 2020

see #305

@lzh2nix lzh2nix changed the title fix issue 305 fix(305)Panic when receive bad packet Mar 5, 2020
@kelindar
Copy link
Contributor

kelindar commented Mar 5, 2020

Looks good. Just to be sure, could you rerun the benchmarks and make sure they're not negatively affected.

@lzh2nix
Copy link
Contributor Author

lzh2nix commented Mar 5, 2020

@kelindar here is benchmark result:

goos: linux
goarch: amd64
pkg: github.com/emitter-io/emitter/internal/network/mqtt
BenchmarkPublishEncode-8   	20000000	        97.9 ns/op	       0 B/op	       0 allocs/op
BenchmarkPublishDecode-8   	10000000	       239 ns/op	     960 B/op	       2 allocs/op
BenchmarkConnectDecode-8   	10000000	       136 ns/op	     192 B/op	       2 allocs/op
PASS
ok  	github.com/emitter-io/emitter/internal/network/mqtt	6.203s

@kelindar kelindar merged commit f0e507e into emitter-io:master Mar 5, 2020
Florimond pushed a commit that referenced this pull request Sep 7, 2023
* use slice index instead of copy of 2 value in range

* fix #305
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

Successfully merging this pull request may close these issues.

2 participants