func (tm *TransactionManager) CommitTransaction(id, connectionID string) (Transaction, error) {
	internalTxId := internalTxId(id, connectionID)
	tx, ok := tm.transactions[internalTxId]

	if ok {
		defer delete(tm.transactions, internalTxId)
		log.Printf("client %s: enacted commit for transaction %s\n", connectionID, id)
		return tx, nil
	}

	return Transaction{}, errors.New("no such transaction found")
}
// CommitTransaction is called when the engine handles a COMMIT frame
// it pulls the transaction by its ID and the client's ID, then sends the Transaction as one unit
// on the provided channel, at which point the Engine handles SENDing the messages
CommitTransaction is called when the engine handles a COMMIT frame
it pulls the transaction by its ID and the client's ID, then sends the Transaction as one unit
on the provided channel, at which point the Engine handles SENDing the messages
// CommitTransaction is called when the engine handles a COMMIT frame // it pulls the transaction by its ID and the client ' s ID then sends the Transaction as one unit // on the provided channel at which point the Engine handles SENDing the messages
func (tm *TransactionManager) CommitTransaction(id, connectionID string) (Transaction, error) {
	internalTxId := internalTxId(id, connectionID)
	tx, ok := tm.transactions[internalTxId]
	if ok {
		defer delete(tm.transactions, internalTxId)
		log.Printf("client %s: enacted commit for transaction %s\n", connectionID, id)
		return tx, nil
	}
	return Transaction{}, errors.New("no such transaction found")
}
func ( tm * TransactionManager ) CommitTransaction ( id , connectionID string ) ( Transaction , error ) { internalTxId := internalTxId ( id , connectionID ) tx , ok := tm . transactions [ internalTxId ] if ok { defer delete ( tm . transactions , internalTxId ) log . Printf ( " \n " , connectionID , id ) return tx , nil } return Transaction { } , errors . New ( " " ) }
CommitTransaction is called when the engine handles a COMMIT frame
it pulls the transaction by its ID and the client's ID, then sends the Transaction as one unit
on the provided channel, at which point the Engine handles SENDing the messages
CommitTransaction is called when the engine handles a COMMIT frame it pulls the transaction by its ID and the client ' s ID then sends the Transaction as one unit on the provided channel at which point the Engine handles SENDing the messages