Catch error for MQTT server to prevent crash on tcp connection reset.