Expose the Status.Fatal function.
authorChris Jones <chris@cjones.org>
Wed, 16 Oct 2013 20:05:02 -0600
changeset 167 7ce61108ed86
parent 166 8093a2da46db
child 168 f4ccc2f29777
Expose the Status.Fatal function.
xmpp/layer1.go
xmpp/status.go
--- a/xmpp/layer1.go	Wed Oct 02 23:22:27 2013 -0600
+++ b/xmpp/layer1.go	Wed Oct 16 20:05:02 2013 -0600
@@ -64,7 +64,7 @@
 	for {
 		select {
 		case stat := <-status:
-			if stat.fatal() {
+			if stat.Fatal() {
 				return
 			}
 
--- a/xmpp/status.go	Wed Oct 02 23:22:27 2013 -0600
+++ b/xmpp/status.go	Wed Oct 16 20:05:02 2013 -0600
@@ -42,7 +42,9 @@
 	StatusError Status = statusError
 )
 
-func (s Status) fatal() bool {
+// Does the status value indicate that the client is or has
+// disconnected?
+func (s Status) Fatal() bool {
 	switch s {
 	default:
 		return false
@@ -135,7 +137,7 @@
 		if current == waitFor {
 			return nil
 		}
-		if current.fatal() {
+		if current.Fatal() {
 			break
 		}
 		if current > waitFor {