fixed message duplication on new connection bug
Merge remote-tracking branch 'upstream/master'