diff --git a/lab1/app/manage-connection/manage-connection.go b/lab1/app/manage-connection/manage-connection.go index 6d922b51918fc04897364399f880cae9447d52e2..bad31e8815e302c441faafb6cc014e150c58ef15 100644 --- a/lab1/app/manage-connection/manage-connection.go +++ b/lab1/app/manage-connection/manage-connection.go @@ -18,6 +18,7 @@ func CreateConnection(destinationAddress string) net.Conn { } func CreateConnectionWithSpecifiedLocalAddress(senderAddress string, destinationAddress string) net.Conn { + fmt.Println("Trying to connect to ", destinationAddress) dialer := net.Dialer{LocalAddr: &net.TCPAddr{IP: net.ParseIP(senderAddress)}} conn, err := dialer.Dial("tcp", destinationAddress) @@ -27,4 +28,4 @@ func CreateConnectionWithSpecifiedLocalAddress(senderAddress string, destination } return conn -} \ No newline at end of file +} diff --git a/lab1/app/sender/sender.go b/lab1/app/sender/sender.go index fe886f56c8bfea97ab634cb0a1bcaf048bc8f98b..450e2491070de19f7e67a0bdeeda821265a55f3b 100644 --- a/lab1/app/sender/sender.go +++ b/lab1/app/sender/sender.go @@ -37,7 +37,6 @@ func SendVoteToNeighbour(config Config, trans Transaction, address string) { func SendAckToNeighbour(config Config, ack AckTransaction, address string) { fmt.Println("*******************STARTING TO SEND ACK*******************") - fmt.Println("Trying to connect to ", address) var ackToSend AckTransaction ackToSend.Id = ack.Id ackToSend.AmountOfCorrectNode = ack.AmountOfCorrectNode @@ -89,8 +88,6 @@ func SendTransactionToAllNeighbours(config Config, trans Transaction) { func SendTransactionToNeighbour(config Config, trans Transaction, destinationIp string, destinationPort string) { fmt.Println() ipAddr := destinationIp + ":" + destinationPort - fmt.Println("Trying to connect to ", destinationIp, ":", destinationPort) - conn := manage_connection.CreateConnectionWithSpecifiedLocalAddress(config.Address, ipAddr) mess := Message{