xmpp/layer3.go
changeset 146 aa9a0ae8f875
parent 145 21a390dd3506
child 147 d7679d991b17
--- a/xmpp/layer3.go	Sun Sep 15 12:31:59 2013 -0600
+++ b/xmpp/layer3.go	Sun Sep 15 12:42:49 2013 -0600
@@ -63,21 +63,19 @@
 // with the server. The control channel controls this loop's
 // activity.
 func writeStream(srvOut chan<- interface{}, cliIn <-chan Stanza,
-	control <-chan int) {
+	control <-chan sendCmd) {
 	defer close(srvOut)
 
 	var input <-chan Stanza
 Loop:
 	for {
 		select {
-		case status := <-control:
-			switch status {
-			case 0:
+		case cmd := <-control:
+			switch cmd {
+			case sendDeny:
 				input = nil
-			case 1:
+			case sendAllow:
 				input = cliIn
-			case -1:
-				break Loop
 			}
 		case x, ok := <-input:
 			if !ok {