Why won't my arduino code upload data to database>?

It's probably not so clever to close the server connection without waiting for the servers reply.