Build your Application in RELEASEmode. Warning:First understand the use of DEBUG mode. when an Assertion is thrown it says something has gone false.(wrong! ), so while developing always use DEBUG mode , so that it gives you warning about failed conditions. In your case, you said that when the server is down it throws an assertion. instread of just ignoring the assertion and moving to release mode, you implement try-catch() in your code. I mean to say "Exception handling". never ignore an assertion and bybass it. Only after handling all the exceptions its advisable to move to release version, good luck.
VuNic