diff --git a/rsaserver.go b/rsaserver.go index 9ab8c4b..df1c9cc 100644 --- a/rsaserver.go +++ b/rsaserver.go @@ -102,7 +102,6 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) { fmt.Println("Exchange, OK!") - // Receive and handle multiple files for { var chunks []string for { @@ -120,12 +119,11 @@ func handleConnection(conn net.Conn, privateKey *rsa.PrivateKey) { conn.Write([]byte("Received and decrypted chunk\n")) } - go decryptAndHandle(chunks, key, iv, uid) - + conn.Write([]byte("Received and decrypted\n")) - // Check if there are more files to receive + moreFiles, err := bufio.NewReader(conn).ReadString('\n') if err != nil { log.Printf("Error reading more files signal: %v", err)