DC++ Core: fix buffer overflow on exit
DC++ Core: delete infinite cycle
for waiting of socket and fix logic