bug fixed for socket read wait event