Exemple #1
0
        void IOThread()
        {
            try {
                socket.Connect();
                socket.ReadLoop();
            } catch (Exception ex) {
                Logger.LogError("Discord relay error", ex);
                if (disconnecting)
                {
                    return;
                }

                // try to recover from dropped connection
                TryReconnect();
            }
        }
Exemple #2
0
        protected override void DoReadLoop()
        {
            try {
                socket.ReadLoop();
            } catch (Exception ex) {
                Exception unpacked = UnpackError(ex);
                // throw a more specific exception if possible
                if (unpacked != null)
                {
                    throw unpacked;
                }

                // rethrow original exception otherwise
                throw;
            }
        }
Exemple #3
0
 protected override void DoReadLoop()
 {
     socket.ReadLoop();
 }