]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/client_conn.go
Merge pull request #92 from jhalter/fix_login_regression
[rbdr/mobius] / hotline / client_conn.go
index 7f7870442c6a9237b64f63dbc5ca66a359634c52..14aef9e835ebc7ae5f79a0d826f55930db0046af 100644 (file)
@@ -44,7 +44,6 @@ type ClientConn struct {
        transfersMU sync.Mutex
        transfers   map[int]map[[4]byte]*FileTransfer
 
-       Agreed bool
        logger *zap.SugaredLogger
 }
 
@@ -157,7 +156,7 @@ func (cc *ClientConn) Disconnect() {
 // notifyOthers sends transaction t to other clients connected to the server
 func (cc *ClientConn) notifyOthers(t Transaction) (trans []Transaction) {
        for _, c := range sortedClients(cc.Server.Clients) {
-               if c.ID != cc.ID && c.Agreed {
+               if c.ID != cc.ID {
                        t.clientID = c.ID
                        trans = append(trans, t)
                }
@@ -170,7 +169,7 @@ func (cc *ClientConn) NewReply(t *Transaction, fields ...Field) Transaction {
        reply := Transaction{
                Flags:     0x00,
                IsReply:   0x01,
-               Type:      t.Type,
+               Type:      []byte{0x00, 0x00},
                ID:        t.ID,
                clientID:  cc.ID,
                ErrorCode: []byte{0, 0, 0, 0},