bugfix: socket.read(fd, nil) should clear buffer size to 0