fixed crash on duplicate socket handle