Expose the Status.Fatal function.
--- 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 {