Closing the socket before settings the state to NN_USOCK_STATE_DONE after a nn_usock_cancel_io call.