bugfix: invalid memory access might happen when the TCP cosockets were used. this regression had appeared in the commit 04775502b2e348181282345320b727ab1a5a8808.