houseofcat / turbocookedrabbit

A user friendly RabbitMQ library written in Golang.
MIT License
107 stars 20 forks source link

Publisher creation (without a Config) has nil for the object when used in AutoPublisher / Deliver Letters. #11

Closed christiannicola closed 4 years ago

christiannicola commented 4 years ago

This fixes a potential nil pointer dereference - it's safer to use the ConnectionPool.Config since that should always be there.

houseofcat commented 4 years ago

This is not correct. It is PoolConfig in v2.

Edit: I responded before having my coffee. I think I understand the problem, using the secondary Publisher create pattern that isn't given a config, you have a nil when attempting to use PoolConfig. Yes your solution is correct then, I have released a hotfix since you have other things committed to this PR. No big deal.

houseofcat commented 4 years ago

Hotfix released (v2.0.8) https://github.com/houseofcat/turbocookedrabbit/releases/tag/v2.0.8