My MacBook Pro sleeps when I turn off external display I have a MacBook Pro (Mid 2012), and had a Dell U24, connected via DVI. I always have the MacBook Pro closed. When I turn off the monitor the MacBook Pro continued working.

Now I have a Dell U27, connected via DisplayPort. Now when I turn off the monitor, the MacBook Pro goes to sleep.

How can I prevent my Mac from sleeping when the display is turned off?
Try putting the monitor to sleep by pressing control+shift+⏏. This will turn off your display and should leave the computer on.

Source: http://support.apple.com/kb/ht1343