zeromq / zmqpp

0mq 'highlevel' C++ bindings
http://zeromq.github.io/zmqpp
Mozilla Public License 2.0
439 stars 195 forks source link

Prevent use of uninitialized variable. #92

Closed xaqq closed 9 years ago

xaqq commented 9 years ago

Problem: wait() wasn't safe: if receive() failed, if would use an unitialized message. Solution: Make sure received didnt fail.

Problem: If receive() was interrupt (EINTR) actor constructor would use a non-initialized signal, causing the assertion to fire. Solution: Replace call to receive() by wait() in actor constructor.

xaqq commented 9 years ago

I just noticed that I pushed this branch on the wrong repo, my bad. I guess I can leave it there, I'll delete the branch when this gets merged.