Added sudden disconnects handling into Sockets