fixed receiveTimeout to not wait beyond the specified limit in the event of multiple internal waits
Merge pull request #1279 from complexmath/fix_receiveTimeout

Fixed an issue where receiveTimeout might wait too long