Help! The TLS connection was non-properly terminated


I need some help on docker installation.
I just installed a fresh Ubuntu 16.04 server and I am now ready to install docker on it.
I’m following the “Get Docker CE for Ubuntu” ( instructions. But when I get to the “Install using the repository” section and I try to install the GPG key with the following command:
curl -fsSL
I get the following answer:
curl: (35) gnutls_handshake() failed: The TLS connection was non-properly terminated.

What am I missing? I really don’t understand.