[JBIDE-17262] Visual Preview Throws socket exceptions

See details in https://issues.jboss.org/browse/JBIDE-17262