bugfix: invalid memory access might happen when the UDP cosockets were used. this regression had appeared in the commit f84ca22c30091c75955d44bd790a714b1ef0bbe9.