diff -r 6e2eea62ccca -r c7f2edd25f4a xmpp.go --- a/xmpp.go Sun Jan 08 09:11:14 2012 -0700 +++ b/xmpp.go Sun Jan 08 12:20:21 2012 -0700 @@ -80,6 +80,7 @@ // the time StartSession() returns. Jid JID password string + tcp net.Conn socket net.Conn socketSync sync.WaitGroup saslExpected string @@ -102,7 +103,6 @@ filterOut chan<- <-chan Stanza filterIn <-chan <-chan Stanza } -var _ io.Closer = &Client{} // Connect to the appropriate server and authenticate as the given JID // with the given password. This function will return as soon as a TCP @@ -147,6 +147,7 @@ cl.Uid = <- Id cl.password = password cl.Jid = *jid + cl.tcp = tcp cl.socket = tcp cl.handlers = make(chan *stanzaHandler, 100) cl.inputControl = make(chan int) @@ -188,11 +189,6 @@ return cl, nil } -func (c *Client) Close() os.Error { - tryClose(c.In, c.Out) - return nil -} - func (cl *Client) startTransport() (io.Reader, io.Writer) { inr, inw := io.Pipe() outr, outw := io.Pipe()