diff -r 21a390dd3506 -r aa9a0ae8f875 xmpp/layer3.go --- 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 {