Apple - Macbook loses network connection when connecting external display
This helped: https://www.youtube.com/watch?v=jObj6YnK44Q
- ALU foil around the cable (up to the tip)
- Bend the cable backwards (make it perpendicular to the screen)
and you're back online.
I had the same problem with a secondary dell monitor. Changing the frequency of the dell display from 60Hz to 50Hz solved the seems to have solved the issue. My guess is that wifi on the recent MacBooks have wifi antenna built into the display module and connecting HDMI with my dell display somehow causes EMC interference which hampers wifi performance. Lowering the frequency seems to fix that problem.
It took a while for a new mini-displayport to DVI adapter to ship, but I have a new one now and no more problems. Apparently these type of converters can cause problems with Macbooks (the entire machine was hanging at times).
So if anyone has problems when connecting something through mini-displayport, know that it might just be low quality stuff and your apple might not like it ;)
UPDATE
Turns out that the new adapter didn't solve everything yet and it was also a hardware defect. Apple replaced pretty much all of the parts in the laptop (only component that wasn't replaced was the ssd) and after that it has been working with a lot less problems. The current wifi issues that I have are probably just related to Yosemite which appears unable to keep a stable connection for more than a few hours.