added receiving timeout
merge with b9121d0