Paste number 313413: mainloop

Paste number 313413: mainloop
Pasted by: phf
When:3 years, 1 month ago
Share:Tweet this! |
Paste contents:
Raw Source | XML | Display As
   (let* ((td (- (get-universal-time) (or *last-pong* 0))))
     (setq *connection-state*
           (ecase *connection-state*
             (:connected (cond ((>= td 30) :needs-ping)
                               (t :connected)))
             (:needs-ping (ignore-errors (irc:ping *connection* (prin1-to-string ts)))
             (:waiting-ping (cond ((< td 30) :connected)
                                  ((> td 60) :disconnect)
                                  (t :waiting-ping)))
             (:disconnect (ignore-errors (irc-disconnect *connection*))
                          (mp:destroy-process *connection-event-process*)
   (sleep 1))

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.