handle socket errors during http sessions