fix bug and add linker to ws2_32.lib

fix not close socket bug when connect fail