producer: fix panic when conn is never assigned