Revert "losing messages on connection"

This reverts commit 6256c9ccf63463716fc9fd9ceeeb80f0f08585c4.