4e762a020077ea49d08f2c60b4d56a0d59e1bd29
hiram
  Mon Apr 5 14:37:55 2021 -0700
better error message in gfClient when dynamic blat server failure refs #26658

diff --git src/inc/errCatch.h src/inc/errCatch.h
index bcaec62..15bdb9c 100644
--- src/inc/errCatch.h
+++ src/inc/errCatch.h
@@ -8,30 +8,40 @@
  * if (errCatchStart(errCatch))
  *     doFlakyStuff();
  * errCatchEnd(errCatch);
  * if (errCatch->gotError)
  *     warn("Flaky stuff failed: %s", errCatch->message->string);
  * errCatchFree(&errCatch); 
  * cleanupFlakyStuff();
  */
 #ifndef ERRCATCH_H
 #define ERRCATCH_H
 
 #ifndef DYSTRING_H
     #include "dystring.h"
 #endif
 
+/* for use in deciding what type of error message to output, typical
+ *  network connection timeout is 120 seconds, if elapsed time to this
+ *  error exit is > NET_TIMEOUT_MS, something is taking too long.
+ *  On the other hand, if the QUICKEXIT time of < 500 ms is noted, then
+ *  something else is wrong about the connection.
+ *  (these are used in gfClient and hgBlat for dynamic blat server messages)
+ */
+#define NET_TIMEOUT_MS	110000
+#define NET_QUICKEXIT_MS	500
+
 struct errCatch
 /* Something to help catch errors.   */
     {
     struct errCatch *next;	 /* Next in stack. */
     jmp_buf jmpBuf;		 /* Where to jump back to for recovery. */
     struct dyString *message; /* Error message if any */
     boolean gotError;		 /* Some sort of error was caught. */
     boolean gotWarning;		 /* Some sort of error warning was raised. */
     };
 
 struct errCatch *errCatchNew();
 /* Return new error catching structure. */
 
 void errCatchFree(struct errCatch **pErrCatch);
 /* Free up resources associated with errCatch */