Permalink
Browse files

Moved NODE-UNREACHABLE-ERROR condition and TRY-CONNECT-AGAIN-RESTART …

…from conditions.lisp to remote-node.lisp.
  • Loading branch information...
1 parent 40dc597 commit b0898aab50f4e4d5a18063753da7a00c9b41ec3d @flambard committed Nov 10, 2012
Showing with 9 additions and 9 deletions.
  1. +0 −9 src/conditions.lisp
  2. +9 −0 src/remote-node.lisp
View
@@ -11,10 +11,6 @@
(defun try-again-condition-p (condition)
(typep condition 'try-again))
-(defun try-connect-again-restart (condition)
- (declare (ignore condition))
- (invoke-restart 'try-connect-again))
-
(define-condition handshake-failed-error (error)
((reason :reader reason :initarg :reason))
(:documentation "This error is signaled if the handshake during connection to a remote node fails."))
@@ -24,11 +20,6 @@
()
(:documentation "This error is signaled when trying to read from a socket stream that has been closed."))
-(define-condition node-unreachable-error (error)
- ;; USOCKET:CONNECTION-REFUSED-ERROR
- ()
- (:documentation "This error is signaled when trying to connect to a node that is unreachable."))
-
(define-condition malformed-message-error (error)
((bytes :reader bytes :initarg :bytes))
(:documentation "This error is signaled when a protocol message is malformed."))
View
@@ -28,6 +28,15 @@
(usocket:socket-stream (remote-node-socket node)))
+(define-condition node-unreachable-error (error)
+ ;; USOCKET:CONNECTION-REFUSED-ERROR
+ ()
+ (:documentation "This error is signaled when trying to connect to a node that is unreachable."))
+
+(defun try-connect-again-restart (condition)
+ (declare (ignore condition))
+ (invoke-restart 'try-connect-again))
+
(defun remote-node-connect (remote-node cookie)
"Connect and perform handshake with a remote node."
(let ((socket

0 comments on commit b0898aa

Please sign in to comment.