client now closes in case of a socket exception