Thank you Erel, no I did not encountered a timeout error, just the connection takes a long time until the closed event fired I think it maybe 30 seconds, I wanted to set the timeout to less time like 10 seconds, I will use the timer for watching the connection state.