Prevent infinite read()s from socket