Socket exception handling for graphite