]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/client_conn.go
Fix multiple issues with v1.8+ login sequence
[rbdr/mobius] / hotline / client_conn.go
index 367b70fdd9f1d92cab447d7035648aaf3e2756f1..8e9a6147c5e3d864d8b2a26378dcdd096ffc7b14 100644 (file)
@@ -37,6 +37,7 @@ type ClientConn struct {
        Idle       bool
        AutoReply  *[]byte
        Transfers  map[int][]*FileTransfer
        Idle       bool
        AutoReply  *[]byte
        Transfers  map[int][]*FileTransfer
+       Agreed     bool
 }
 
 func (cc *ClientConn) sendAll(t int, fields ...Field) {
 }
 
 func (cc *ClientConn) sendAll(t int, fields ...Field) {
@@ -168,7 +169,7 @@ func (cc ClientConn) Disconnect() {
 // NotifyOthers sends transaction t to other clients connected to the server
 func (cc ClientConn) NotifyOthers(t Transaction) {
        for _, c := range sortedClients(cc.Server.Clients) {
 // NotifyOthers sends transaction t to other clients connected to the server
 func (cc ClientConn) NotifyOthers(t Transaction) {
        for _, c := range sortedClients(cc.Server.Clients) {
-               if c.ID != cc.ID {
+               if c.ID != cc.ID && c.Agreed {
                        t.clientID = c.ID
                        cc.Server.outbox <- t
                }
                        t.clientID = c.ID
                        cc.Server.outbox <- t
                }