Handle broken socket, better request handling